Primer Commit
This commit is contained in:
328
assets/extra-libs/taskboard/js/demo.js
Normal file
328
assets/extra-libs/taskboard/js/demo.js
Normal file
@@ -0,0 +1,328 @@
|
||||
/**
|
||||
* Created by Zura on 4/5/2016.
|
||||
*/
|
||||
$(function () {
|
||||
Lobibox.notify.DEFAULTS = $.extend({}, Lobibox.notify.DEFAULTS, {
|
||||
size: 'mini',
|
||||
// delay: false,
|
||||
position: 'right top'
|
||||
});
|
||||
|
||||
//Basic example
|
||||
$('#todo-lists-basic-demo').lobiList({
|
||||
lists: [
|
||||
{
|
||||
id: 'todo',
|
||||
title: 'TODO',
|
||||
defaultStyle: 'lobilist-info',
|
||||
items: [
|
||||
{
|
||||
title: 'Floor cool cinders',
|
||||
description: 'Thunder fulfilled travellers folly, wading, lake.',
|
||||
dueDate: '2015-01-31'
|
||||
},
|
||||
{
|
||||
title: 'Periods pride',
|
||||
description: 'Accepted was mollis',
|
||||
done: true
|
||||
},
|
||||
{
|
||||
title: 'Flags better burns pigeon',
|
||||
description: 'Rowed cloven frolic thereby, vivamus pining gown intruding strangers prank treacherously darkling.'
|
||||
},
|
||||
{
|
||||
title: 'Accepted was mollis',
|
||||
description: 'Rowed cloven frolic thereby, vivamus pining gown intruding strangers prank treacherously darkling.',
|
||||
dueDate: '2015-02-02'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'DOING',
|
||||
items: [
|
||||
{
|
||||
title: 'Composed trays',
|
||||
description: 'Hoary rattle exulting suspendisse elit paradises craft wistful. Bayonets allures prefer traits wrongs flushed. Tent wily matched bold polite slab coinage celerities gales beams.'
|
||||
},
|
||||
{
|
||||
title: 'Chic leafy'
|
||||
},
|
||||
{
|
||||
title: 'Guessed interdum armies chirp writhes most',
|
||||
description: 'Came champlain live leopards twilight whenever warm read wish squirrel rock.',
|
||||
dueDate: '2015-02-04',
|
||||
done: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
//Custom datepicker
|
||||
$('#todo-lists-demo-datepicker').lobiList({
|
||||
lists: [
|
||||
{
|
||||
title: 'TODO',
|
||||
defaultStyle: 'lobilist-info',
|
||||
items: [
|
||||
{
|
||||
title: 'Floor cool cinders',
|
||||
description: 'Thunder fulfilled travellers folly, wading, lake.',
|
||||
dueDate: '2015-01-31'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
afterListAdd: function(lobilist, list){
|
||||
var $dueDateInput = list.$el.find('form [name=dueDate]');
|
||||
$dueDateInput.datepicker();
|
||||
}
|
||||
});
|
||||
// Event handling
|
||||
(function () {
|
||||
var list;
|
||||
|
||||
$('#todo-lists-initialize-btn').click(function () {
|
||||
list = $('#todo-lists-demo-events')
|
||||
.lobiList({
|
||||
init: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'init'
|
||||
});
|
||||
},
|
||||
beforeDestroy: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeDestroy'
|
||||
});
|
||||
},
|
||||
afterDestroy: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterDestroy'
|
||||
});
|
||||
},
|
||||
beforeListAdd: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeListAdd'
|
||||
});
|
||||
},
|
||||
afterListAdd: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterListAdd'
|
||||
});
|
||||
},
|
||||
beforeListRemove: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeListRemove'
|
||||
});
|
||||
},
|
||||
afterListRemove: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterListRemove'
|
||||
});
|
||||
},
|
||||
beforeItemAdd: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeItemAdd'
|
||||
});
|
||||
},
|
||||
afterItemAdd: function () {
|
||||
console.log(arguments);
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterItemAdd'
|
||||
});
|
||||
},
|
||||
beforeItemUpdate: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeItemUpdate'
|
||||
});
|
||||
},
|
||||
afterItemUpdate: function () {
|
||||
console.log(arguments);
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterItemUpdate'
|
||||
});
|
||||
},
|
||||
beforeItemDelete: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeItemDelete'
|
||||
});
|
||||
},
|
||||
afterItemDelete: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterItemDelete'
|
||||
});
|
||||
},
|
||||
beforeListDrop: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeListDrop'
|
||||
});
|
||||
},
|
||||
afterListReorder: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterListReorder'
|
||||
});
|
||||
},
|
||||
beforeItemDrop: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeItemDrop'
|
||||
});
|
||||
},
|
||||
afterItemReorder: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterItemReorder'
|
||||
});
|
||||
},
|
||||
afterMarkAsDone: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterMarkAsDone'
|
||||
});
|
||||
},
|
||||
afterMarkAsUndone: function () {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterMarkAsUndone'
|
||||
});
|
||||
},
|
||||
styleChange: function(list, oldStyle, newStyle){
|
||||
console.log(arguments);
|
||||
Lobibox.notify('default', {
|
||||
msg: 'styleChange: Old style - "'+oldStyle+'". New style - "'+ newStyle +'"'
|
||||
});
|
||||
},
|
||||
titleChange: function(list, oldTitle, newTitle){
|
||||
console.log(arguments);
|
||||
Lobibox.notify('default', {
|
||||
msg: 'titleChange: Old title - "'+oldTitle+'". New title - "'+ newTitle + '"'
|
||||
});
|
||||
},
|
||||
lists: [
|
||||
{
|
||||
title: 'TODO',
|
||||
defaultStyle: 'lobilist-info',
|
||||
items: [
|
||||
{
|
||||
title: 'Floor cool cinders',
|
||||
description: 'Thunder fulfilled travellers folly, wading, lake.',
|
||||
dueDate: '2015-01-31'
|
||||
},
|
||||
{
|
||||
title: 'Periods pride',
|
||||
description: 'Accepted was mollis',
|
||||
done: true
|
||||
},
|
||||
{
|
||||
title: 'Flags better burns pigeon',
|
||||
description: 'Rowed cloven frolic thereby, vivamus pining gown intruding strangers prank ' +
|
||||
'treacherously darkling.'
|
||||
},
|
||||
{
|
||||
title: 'Accepted was mollis',
|
||||
description: 'Rowed cloven frolic thereby, vivamus pining gown intruding strangers prank ' +
|
||||
'treacherously darkling.',
|
||||
dueDate: '2015-02-02'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
.data('lobiList');
|
||||
});
|
||||
|
||||
$('#todo-lists-destroy-btn').click(function () {
|
||||
list.destroy();
|
||||
});
|
||||
})();
|
||||
// Custom controls
|
||||
$('#todo-lists-demo-controls').lobiList({
|
||||
lists: [
|
||||
{
|
||||
title: 'TODO',
|
||||
defaultStyle: 'lobilist-info',
|
||||
controls: ['edit', 'styleChange'],
|
||||
items: [
|
||||
{
|
||||
title: 'Floor cool cinders',
|
||||
description: 'Thunder fulfilled travellers folly, wading, lake.',
|
||||
dueDate: '2015-01-31'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Disabled custom checkboxes',
|
||||
defaultStyle: 'lobilist-danger',
|
||||
controls: ['edit', 'add', 'remove'],
|
||||
useLobicheck: false,
|
||||
items: [
|
||||
{
|
||||
title: 'Periods pride',
|
||||
description: 'Accepted was mollis',
|
||||
done: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Controls disabled',
|
||||
controls: false,
|
||||
items: [
|
||||
{
|
||||
title: 'Composed trays',
|
||||
description: 'Hoary rattle exulting suspendisse elit paradises craft wistful. ' +
|
||||
'Bayonets allures prefer traits wrongs flushed. Tent wily matched bold polite slab coinage ' +
|
||||
'celerities gales beams.'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Disabled todo edit/remove',
|
||||
enableTodoRemove: false,
|
||||
enableTodoEdit: false,
|
||||
items: [
|
||||
{
|
||||
title: 'Composed trays',
|
||||
description: 'Hoary rattle exulting suspendisse elit paradises craft wistful. ' +
|
||||
'Bayonets allures prefer traits wrongs flushed. Tent wily matched bold polite slab coinage ' +
|
||||
'celerities gales beams.'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
// Disabled drag & drop
|
||||
$('#todo-lists-demo-sorting').lobiList({
|
||||
sortable: false,
|
||||
lists: [
|
||||
{
|
||||
title: 'TODO',
|
||||
defaultStyle: 'lobilist-info',
|
||||
controls: ['edit', 'styleChange'],
|
||||
items: [
|
||||
{
|
||||
title: 'Floor cool cinders',
|
||||
description: 'Thunder fulfilled travellers folly, wading, lake.',
|
||||
dueDate: '2015-01-31'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Controls disabled',
|
||||
controls: false,
|
||||
items: [
|
||||
{
|
||||
title: 'Composed trays',
|
||||
description: 'Hoary rattle exulting suspendisse elit paradises craft wistful. Bayonets allures prefer traits wrongs flushed. Tent wily matched bold polite slab coinage celerities gales beams.'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$('#actions-by-ajax').lobiList({
|
||||
actions: {
|
||||
load: 'demo/example1/load.json',
|
||||
insert: 'demo/example1/insert.php',
|
||||
delete: 'demo/example1/delete.php',
|
||||
update: 'demo/example1/update.php'
|
||||
},
|
||||
afterItemAdd: function(){
|
||||
console.log(arguments);
|
||||
}
|
||||
});
|
||||
});
|
||||
13
assets/extra-libs/taskboard/js/jquery-ui.min.js
vendored
Normal file
13
assets/extra-libs/taskboard/js/jquery-ui.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
196
assets/extra-libs/taskboard/js/jquery.ui.touch-punch-improved.js
vendored
Normal file
196
assets/extra-libs/taskboard/js/jquery.ui.touch-punch-improved.js
vendored
Normal file
@@ -0,0 +1,196 @@
|
||||
/*!
|
||||
* jQuery UI Touch Punch Improved 0.3.1
|
||||
*
|
||||
*
|
||||
* Copyright 2013, Chris Hutchinson <chris@brushd.com>
|
||||
* Original jquery-ui-touch-punch Copyright 2011, Dave Furfero
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.widget.js
|
||||
* jquery.ui.mouse.js
|
||||
*/
|
||||
(function ($) {
|
||||
var pointerEnabled = window.navigator.pointerEnabled
|
||||
|| window.navigator.msPointerEnabled;
|
||||
|
||||
// Detect touch support
|
||||
$.support.touch = 'ontouchend' in document || pointerEnabled;
|
||||
|
||||
// Ignore browsers without touch support or mouse support
|
||||
if (!$.support.touch || !$.ui.mouse) {
|
||||
return;
|
||||
}
|
||||
|
||||
var mouseProto = $.ui.mouse.prototype,
|
||||
_mouseInit = mouseProto._mouseInit,
|
||||
touchHandled;
|
||||
|
||||
// see http://stackoverflow.com/a/12714084/220825
|
||||
function fixTouch(touch) {
|
||||
var winPageX = window.pageXOffset,
|
||||
winPageY = window.pageYOffset,
|
||||
x = touch.clientX,
|
||||
y = touch.clientY;
|
||||
|
||||
if (touch.pageY === 0 && Math.floor(y) > Math.floor(touch.pageY) || touch.pageX === 0 && Math.floor(x) > Math.floor(touch.pageX)) {
|
||||
// iOS4 clientX/clientY have the value that should have been
|
||||
// in pageX/pageY. While pageX/page/ have the value 0
|
||||
x = x - winPageX;
|
||||
y = y - winPageY;
|
||||
} else if (y < (touch.pageY - winPageY) || x < (touch.pageX - winPageX)) {
|
||||
// Some Android browsers have totally bogus values for clientX/Y
|
||||
// when scrolling/zooming a page. Detectable since clientX/clientY
|
||||
// should never be smaller than pageX/pageY minus page scroll
|
||||
x = touch.pageX - winPageX;
|
||||
y = touch.pageY - winPageY;
|
||||
}
|
||||
|
||||
return {
|
||||
clientX: x,
|
||||
clientY: y
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Simulate a mouse event based on a corresponding touch event
|
||||
* @param {Object} event A touch event
|
||||
* @param {String} simulatedType The corresponding mouse event
|
||||
*/
|
||||
function simulateMouseEvent (event, simulatedType) {
|
||||
// Ignore multi-touch events
|
||||
if ((!pointerEnabled && event.originalEvent.touches.length > 1) || (pointerEnabled && !event.isPrimary)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var touch = pointerEnabled ? event.originalEvent : event.originalEvent.changedTouches[0],
|
||||
simulatedEvent = document.createEvent('MouseEvents'),
|
||||
coord = fixTouch(touch);
|
||||
|
||||
// Check if element is an input or a textarea
|
||||
if ($(touch.target).is("input") || $(touch.target).is("textarea")) {
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
// Initialize the simulated mouse event using the touch event's coordinates
|
||||
simulatedEvent.initMouseEvent(
|
||||
simulatedType, // type
|
||||
true, // bubbles
|
||||
true, // cancelable
|
||||
window, // view
|
||||
1, // detail
|
||||
event.screenX || touch.screenX, // screenX
|
||||
event.screenY || touch.screenY, // screenY
|
||||
event.clientX || coord.clientX, // clientX
|
||||
event.clientY || coord.clientY, // clientY
|
||||
false, // ctrlKey
|
||||
false, // altKey
|
||||
false, // shiftKey
|
||||
false, // metaKey
|
||||
0, // button
|
||||
null // relatedTarget
|
||||
);
|
||||
|
||||
// Dispatch the simulated event to the target element
|
||||
event.target.dispatchEvent(simulatedEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the jQuery UI widget's touchstart events
|
||||
* @param {Object} event The widget element's touchstart event
|
||||
*/
|
||||
mouseProto._touchStart = function (event) {
|
||||
var self = this;
|
||||
|
||||
// Ignore the event if another widget is already being handled
|
||||
if (touchHandled || (!pointerEnabled && !self._mouseCapture(event.originalEvent.changedTouches[0]))) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Set the flag to prevent other widgets from inheriting the touch event
|
||||
touchHandled = true;
|
||||
|
||||
// Track movement to determine if interaction was a click
|
||||
self._touchMoved = false;
|
||||
|
||||
// Simulate the mouseover event
|
||||
simulateMouseEvent(event, 'mouseover');
|
||||
|
||||
// Simulate the mousemove event
|
||||
simulateMouseEvent(event, 'mousemove');
|
||||
|
||||
// Simulate the mousedown event
|
||||
simulateMouseEvent(event, 'mousedown');
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle the jQuery UI widget's touchmove events
|
||||
* @param {Object} event The document's touchmove event
|
||||
*/
|
||||
mouseProto._touchMove = function (event) {
|
||||
// Ignore event if not handled
|
||||
if (!touchHandled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Interaction was not a click
|
||||
this._touchMoved = true;
|
||||
|
||||
// Simulate the mousemove event
|
||||
simulateMouseEvent(event, 'mousemove');
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle the jQuery UI widget's touchend events
|
||||
* @param {Object} event The document's touchend event
|
||||
*/
|
||||
mouseProto._touchEnd = function (event) {
|
||||
// Ignore event if not handled
|
||||
if (!touchHandled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Simulate the mouseup event
|
||||
simulateMouseEvent(event, 'mouseup');
|
||||
|
||||
// Simulate the mouseout event
|
||||
simulateMouseEvent(event, 'mouseout');
|
||||
|
||||
// If the touch interaction did not move, it should trigger a click
|
||||
if (!this._touchMoved) {
|
||||
// Simulate the click event
|
||||
simulateMouseEvent(event, 'click');
|
||||
}
|
||||
|
||||
// Unset the flag to allow other widgets to inherit the touch event
|
||||
touchHandled = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* A duck punch of the $.ui.mouse _mouseInit method to support touch events.
|
||||
* This method extends the widget with bound touch event handlers that
|
||||
* translate touch events to mouse events and pass them to the widget's
|
||||
* original mouse event handling methods.
|
||||
*/
|
||||
mouseProto._mouseInit = function () {
|
||||
var self = this;
|
||||
|
||||
self.element.on({
|
||||
'touchstart': $.proxy(self, '_touchStart'),
|
||||
'touchmove': $.proxy(self, '_touchMove'),
|
||||
'touchend': $.proxy(self, '_touchEnd'),
|
||||
'pointerDown': $.proxy(self, '_touchStart'),
|
||||
'pointerMove': $.proxy(self, '_touchMove'),
|
||||
'pointerUp': $.proxy(self, '_touchEnd'),
|
||||
'MSPointerDown': $.proxy(self, '_touchStart'),
|
||||
'MSPointerMove': $.proxy(self, '_touchMove'),
|
||||
'MSPointerUp': $.proxy(self, '_touchEnd')
|
||||
});
|
||||
|
||||
// Call the original $.ui.mouse init method
|
||||
_mouseInit.call(self);
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
1
assets/extra-libs/taskboard/js/lobibox.min.js
vendored
Normal file
1
assets/extra-libs/taskboard/js/lobibox.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1224
assets/extra-libs/taskboard/js/lobilist.js
Normal file
1224
assets/extra-libs/taskboard/js/lobilist.js
Normal file
File diff suppressed because it is too large
Load Diff
1
assets/extra-libs/taskboard/js/lobilist.min.js
vendored
Normal file
1
assets/extra-libs/taskboard/js/lobilist.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
333
assets/extra-libs/taskboard/js/task-init.js
Normal file
333
assets/extra-libs/taskboard/js/task-init.js
Normal file
@@ -0,0 +1,333 @@
|
||||
$(function() {
|
||||
/**
|
||||
* Created by Zura on 4/5/2016.
|
||||
*/
|
||||
$(function() {
|
||||
Lobibox.notify.DEFAULTS = $.extend({}, Lobibox.notify.DEFAULTS, {
|
||||
size: 'mini',
|
||||
// delay: false,
|
||||
position: 'right top'
|
||||
});
|
||||
|
||||
//Basic example
|
||||
$('#todo-lists-basic-demo').lobiList({
|
||||
lists: [{
|
||||
id: 'todo',
|
||||
title: 'Todo',
|
||||
defaultStyle: 'lobilist-danger',
|
||||
items: [{
|
||||
title: 'Floor cool cinders',
|
||||
description: 'Thunder fulfilled travellers folly, wading, lake.',
|
||||
dueDate: '2015-01-31'
|
||||
},
|
||||
{
|
||||
title: 'Periods pride',
|
||||
description: 'Accepted was mollis',
|
||||
done: true
|
||||
},
|
||||
{
|
||||
title: 'Flags better burns pigeon',
|
||||
description: 'Rowed cloven frolic thereby, vivamus pining gown intruding strangers prank treacherously darkling.'
|
||||
},
|
||||
{
|
||||
title: 'Accepted was mollis',
|
||||
description: 'Rowed cloven frolic thereby, vivamus pining gown intruding strangers prank treacherously darkling.',
|
||||
dueDate: '2015-02-02'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'doing',
|
||||
title: 'Doing',
|
||||
defaultStyle: 'lobilist-primary',
|
||||
items: [{
|
||||
title: 'Composed trays',
|
||||
description: 'Hoary rattle exulting suspendisse elit paradises craft wistful. Bayonets allures prefer traits wrongs flushed. Tent wily matched bold polite slab coinage celerities gales beams.'
|
||||
},
|
||||
{
|
||||
title: 'Chic leafy'
|
||||
},
|
||||
{
|
||||
title: 'Guessed interdum armies chirp writhes most',
|
||||
description: 'Came champlain live leopards twilight whenever warm read wish squirrel rock.',
|
||||
dueDate: '2015-02-04',
|
||||
done: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'Done',
|
||||
title: 'Done',
|
||||
defaultStyle: 'lobilist-success',
|
||||
items: [{
|
||||
title: 'Composed trays',
|
||||
description: 'Hoary rattle exulting suspendisse elit paradises craft wistful. Bayonets allures prefer traits wrongs flushed. Tent wily matched bold polite slab coinage celerities gales beams.'
|
||||
},
|
||||
{
|
||||
title: 'Chic leafy'
|
||||
},
|
||||
{
|
||||
title: 'Guessed interdum armies chirp writhes most',
|
||||
description: 'Came champlain live leopards twilight whenever warm read wish squirrel rock.',
|
||||
dueDate: '2015-02-04',
|
||||
done: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
//Custom datepicker
|
||||
$('#todo-lists-demo-datepicker').lobiList({
|
||||
lists: [{
|
||||
title: 'Todo',
|
||||
defaultStyle: 'lobilist-info',
|
||||
items: [{
|
||||
title: 'Floor cool cinders',
|
||||
description: 'Thunder fulfilled travellers folly, wading, lake.',
|
||||
dueDate: '2015-01-31'
|
||||
}]
|
||||
}],
|
||||
afterListAdd: function(lobilist, list) {
|
||||
var $dueDateInput = list.$el.find('form [name=dueDate]');
|
||||
$dueDateInput.datepicker();
|
||||
}
|
||||
});
|
||||
// Event handling
|
||||
(function() {
|
||||
var list;
|
||||
|
||||
$('#todo-lists-initialize-btn').click(function() {
|
||||
list = $('#todo-lists-demo-events')
|
||||
.lobiList({
|
||||
init: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'init'
|
||||
});
|
||||
},
|
||||
beforeDestroy: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeDestroy'
|
||||
});
|
||||
},
|
||||
afterDestroy: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterDestroy'
|
||||
});
|
||||
},
|
||||
beforeListAdd: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeListAdd'
|
||||
});
|
||||
},
|
||||
afterListAdd: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterListAdd'
|
||||
});
|
||||
},
|
||||
beforeListRemove: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeListRemove'
|
||||
});
|
||||
},
|
||||
afterListRemove: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterListRemove'
|
||||
});
|
||||
},
|
||||
beforeItemAdd: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeItemAdd'
|
||||
});
|
||||
},
|
||||
afterItemAdd: function() {
|
||||
console.log(arguments);
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterItemAdd'
|
||||
});
|
||||
},
|
||||
beforeItemUpdate: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeItemUpdate'
|
||||
});
|
||||
},
|
||||
afterItemUpdate: function() {
|
||||
console.log(arguments);
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterItemUpdate'
|
||||
});
|
||||
},
|
||||
beforeItemDelete: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeItemDelete'
|
||||
});
|
||||
},
|
||||
afterItemDelete: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterItemDelete'
|
||||
});
|
||||
},
|
||||
beforeListDrop: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeListDrop'
|
||||
});
|
||||
},
|
||||
afterListReorder: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterListReorder'
|
||||
});
|
||||
},
|
||||
beforeItemDrop: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'beforeItemDrop'
|
||||
});
|
||||
},
|
||||
afterItemReorder: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterItemReorder'
|
||||
});
|
||||
},
|
||||
afterMarkAsDone: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterMarkAsDone'
|
||||
});
|
||||
},
|
||||
afterMarkAsUndone: function() {
|
||||
Lobibox.notify('default', {
|
||||
msg: 'afterMarkAsUndone'
|
||||
});
|
||||
},
|
||||
styleChange: function(list, oldStyle, newStyle) {
|
||||
console.log(arguments);
|
||||
Lobibox.notify('default', {
|
||||
msg: 'styleChange: Old style - "' + oldStyle + '". New style - "' + newStyle + '"'
|
||||
});
|
||||
},
|
||||
titleChange: function(list, oldTitle, newTitle) {
|
||||
console.log(arguments);
|
||||
Lobibox.notify('default', {
|
||||
msg: 'titleChange: Old title - "' + oldTitle + '". New title - "' + newTitle + '"'
|
||||
});
|
||||
},
|
||||
lists: [{
|
||||
title: 'Todo',
|
||||
defaultStyle: 'lobilist-info',
|
||||
items: [{
|
||||
title: 'Floor cool cinders',
|
||||
description: 'Thunder fulfilled travellers folly, wading, lake.',
|
||||
dueDate: '2015-01-31'
|
||||
},
|
||||
{
|
||||
title: 'Periods pride',
|
||||
description: 'Accepted was mollis',
|
||||
done: true
|
||||
},
|
||||
{
|
||||
title: 'Flags better burns pigeon',
|
||||
description: 'Rowed cloven frolic thereby, vivamus pining gown intruding strangers prank ' +
|
||||
'treacherously darkling.'
|
||||
},
|
||||
{
|
||||
title: 'Accepted was mollis',
|
||||
description: 'Rowed cloven frolic thereby, vivamus pining gown intruding strangers prank ' +
|
||||
'treacherously darkling.',
|
||||
dueDate: '2015-02-02'
|
||||
}
|
||||
]
|
||||
}]
|
||||
})
|
||||
.data('lobiList');
|
||||
});
|
||||
|
||||
$('#todo-lists-destroy-btn').click(function() {
|
||||
list.destroy();
|
||||
});
|
||||
})();
|
||||
// Custom controls
|
||||
$('#todo-lists-demo-controls').lobiList({
|
||||
lists: [{
|
||||
title: 'Todo',
|
||||
defaultStyle: 'lobilist-info',
|
||||
controls: ['edit', 'styleChange'],
|
||||
items: [{
|
||||
title: 'Floor cool cinders',
|
||||
description: 'Thunder fulfilled travellers folly, wading, lake.',
|
||||
dueDate: '2015-01-31'
|
||||
}]
|
||||
},
|
||||
{
|
||||
title: 'Disabled checkboxes',
|
||||
defaultStyle: 'lobilist-danger',
|
||||
controls: ['edit', 'add', 'remove'],
|
||||
useLobicheck: false,
|
||||
items: [{
|
||||
title: 'Periods pride',
|
||||
description: 'Accepted was mollis',
|
||||
done: true
|
||||
}]
|
||||
},
|
||||
{
|
||||
title: 'Controls disabled',
|
||||
controls: false,
|
||||
items: [{
|
||||
title: 'Composed trays',
|
||||
description: 'Hoary rattle exulting suspendisse elit paradises craft wistful. ' +
|
||||
'Bayonets allures prefer traits wrongs flushed. Tent wily matched bold polite slab coinage ' +
|
||||
'celerities gales beams.'
|
||||
}]
|
||||
},
|
||||
{
|
||||
title: 'No edit/remove',
|
||||
enableTodoRemove: false,
|
||||
enableTodoEdit: false,
|
||||
items: [{
|
||||
title: 'Composed trays',
|
||||
description: 'Hoary rattle exulting suspendisse elit paradises craft wistful. ' +
|
||||
'Bayonets allures prefer traits wrongs flushed. Tent wily matched bold polite slab coinage ' +
|
||||
'celerities gales beams.'
|
||||
}]
|
||||
}
|
||||
]
|
||||
});
|
||||
// Disabled drag & drop
|
||||
$('#todo-lists-demo-sorting').lobiList({
|
||||
sortable: false,
|
||||
lists: [{
|
||||
title: 'Todo',
|
||||
defaultStyle: 'lobilist-info',
|
||||
controls: ['edit', 'styleChange'],
|
||||
items: [{
|
||||
title: 'Floor cool cinders',
|
||||
description: 'Thunder fulfilled travellers folly, wading, lake.',
|
||||
dueDate: '2015-01-31'
|
||||
}]
|
||||
},
|
||||
{
|
||||
title: 'Controls disabled',
|
||||
controls: false,
|
||||
items: [{
|
||||
title: 'Composed trays',
|
||||
description: 'Hoary rattle exulting suspendisse elit paradises craft wistful. Bayonets allures prefer traits wrongs flushed. Tent wily matched bold polite slab coinage celerities gales beams.'
|
||||
}]
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$('#actions-by-ajax').lobiList({
|
||||
actions: {
|
||||
load: '../example1/load.json',
|
||||
insert: '../example1/insert.php',
|
||||
delete: '../example1/delete.php',
|
||||
update: '../example1/update.php'
|
||||
},
|
||||
afterItemAdd: function() {
|
||||
console.log(arguments);
|
||||
}
|
||||
});
|
||||
|
||||
$('.datepicker').datepicker({
|
||||
autoclose: true,
|
||||
todayHighlight: true
|
||||
});
|
||||
$('.lobilist').perfectScrollbar();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user