-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjs_lib_external_jquery-layout_versions_plugins_jquery.layout.plugins-1.0.js.html
More file actions
660 lines (588 loc) · 22.7 KB
/
js_lib_external_jquery-layout_versions_plugins_jquery.layout.plugins-1.0.js.html
File metadata and controls
660 lines (588 loc) · 22.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: js/lib_external/jquery-layout/versions/plugins/jquery.layout.plugins-1.0.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: js/lib_external/jquery-layout/versions/plugins/jquery.layout.plugins-1.0.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>;(function ($) {
// jquery.layout.js MUST load first
if (!$.layout) return;
// NOTE: For best readability, view with a fixed-width font and tabs equal to 4-chars
/**
* @preserve jquery.layout.state 1.0
* $Date: 2011-07-16 08:00:00 (Sat, 16 July 2011) $
*
* Copyright (c) 2010
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* @dependancies: UI Layout 1.3.0.rc30.1 or higher
* @dependancies: $.ui.cookie (above)
*
* @support: http://groups.google.com/group/jquery-ui-layout
*/
/*
* State-management options stored in options.stateManagement, which includes a .cookie hash
* Default options saves ALL KEYS for ALL PANES, ie: pane.size, pane.isClosed, pane.isHidden
*
* // STATE/COOKIE OPTIONS
* @example $(el).layout({
stateManagement: {
enabled: true
, stateKeys: "east.size,west.size,east.isClosed,west.isClosed"
, cookie: { name: "appLayout", path: "/" }
}
})
* @example $(el).layout({ stateManagement__enabled: true }) // enable auto-state-management using cookies
* @example $(el).layout({ stateManagement__cookie: { name: "appLayout", path: "/" } })
* @example $(el).layout({ stateManagement__cookie__name: "appLayout", stateManagement__cookie__path: "/" })
*
* // STATE/COOKIE METHODS
* @example myLayout.saveCookie( "west.isClosed,north.size,south.isHidden", {expires: 7} );
* @example myLayout.loadCookie();
* @example myLayout.deleteCookie();
* @example var JSON = myLayout.readState(); // CURRENT Layout State
* @example var JSON = myLayout.readCookie(); // SAVED Layout State (from cookie)
* @example var JSON = myLayout.state.stateData; // LAST LOADED Layout State (cookie saved in layout.state hash)
*
* CUSTOM STATE-MANAGEMENT (eg, saved in a database)
* @example var JSON = myLayout.readState( "west.isClosed,north.size,south.isHidden" );
* @example myLayout.loadState( JSON );
*/
/**
* UI COOKIE UTILITY
*
* A $.cookie OR $.ui.cookie namespace *should be standard*, but until then...
* This creates $.ui.cookie so Layout does not need the cookie.jquery.js plugin
* NOTE: This utility is REQUIRED by the layout.state plugin
*/
$.ui.cookie = {
// TODO: is the cookieEnabled property fully cross-browser???
acceptsCookies: !!navigator.cookieEnabled
, read: function (name) {
var
c = document.cookie
, cs = c ? c.split(';') : []
, pair // loop var
;
for (var i=0, n=cs.length; i < n; i++) {
pair = $.trim(cs[i]).split('='); // name=value pair
if (pair[0] == name) // found the layout cookie
return decodeURIComponent(pair[1]);
}
return "";
}
, write: function (name, val, cookieOpts) {
var
params = ''
, date = ''
, clear = false
, o = cookieOpts || {}
;
if (!o.expires) {} // skip
else if (o.expires.toUTCString)
date = o.expires;
else if (typeof o.expires == 'number') {
date = new Date();
if (o.expires > 0)
date.setDate(date.getDate() + o.expires);
else {
date.setFullYear(1970);
clear = true;
}
}
if (date) params += ';expires='+ date.toUTCString();
if (o.path) params += ';path='+ o.path;
if (o.domain) params += ';domain='+ o.domain;
if (o.secure) params += ';secure';
document.cookie = name +'='+ (clear ? "" : encodeURIComponent( val )) + params; // write or clear cookie
}
, clear: function (name) {
$.ui.cookie.write(name, '', {expires: -1});
}
};
// Cookie methods in Layout are part of State Managment
// tell Layout that the state plugin is available
$.layout.plugins.stateManagement = true;
// Add State-Management options to layout.defaults
$.layout.defaults.stateManagement = {
enabled: false // true = enable state-management, even if not using cookies
, autoSave: true // Save a state-cookie when page exits?
, autoLoad: true // Load the state-cookie when Layout inits?
// List state-data to save - must be pane-specific
, stateKeys: "north.size,south.size,east.size,west.size,"+
"north.isClosed,south.isClosed,east.isClosed,west.isClosed,"+
"north.isHidden,south.isHidden,east.isHidden,west.isHidden"
, cookie: {
name: "" // If not specified, will use Layout.name, else just "Layout"
, domain: "" // blank = current domain
, path: "" // blank = current page, '/' = entire website
, expires: "" // 'days' to keep cookie - leave blank for 'session cookie'
, secure: false
}
};
// Set stateManagement as a layout-option, NOT a pane-option
$.layout.optionsMap.layout.push("stateManagement");
/*
* State Managment methods
*/
$.layout.state = {
// set data used by multiple methods below
config: {
allPanes: "north,south,west,east,center"
}
/**
* Get the current layout state and save it to a cookie
*
* myLayout.saveCookie( keys, cookieOpts )
*
* @param {Object} inst
* @param {(string|Array)=} keys
* @param {Object=} opts
*/
, saveCookie: function (inst, keys, cookieOpts) {
var o = inst.options
, oS = o.stateManagement
, oC = $.extend( {}, oS.cookie, cookieOpts || {} )
, data = inst.state.stateData = inst.readState( keys || oS.stateKeys ) // read current panes-state
;
$.ui.cookie.write( oC.name || o.name || "Layout", $.layout.state.encodeJSON(data), oC );
return $.extend( {}, data ); // return COPY of state.stateData data
}
/**
* Remove the state cookie
*
* @param {Object} inst
*/
, deleteCookie: function (inst) {
var o = inst.options;
$.ui.cookie.clear( o.stateManagement.cookie.name || o.name || "Layout" );
}
/**
* Read & return data from the cookie - as JSON
*
* @param {Object} inst
*/
, readCookie: function (inst) {
var o = inst.options;
var c = $.ui.cookie.read( o.stateManagement.cookie.name || o.name || "Layout" );
// convert cookie string back to a hash and return it
return c ? $.layout.state.decodeJSON(c) : {};
}
/**
* Get data from the cookie and USE IT to loadState
*
* @param {Object} inst
*/
, loadCookie: function (inst) {
var c = $.layout.state.readCookie(inst); // READ the cookie
if (c) {
inst.state.stateData = $.extend({}, c); // SET state.stateData
inst.loadState(c); // LOAD the retrieved state
}
return c;
}
/**
* Update layout options from the cookie, if one exists
*
* @param {Object} inst
* @param {Object=} stateData
* @param {boolean=} animate
*/
, loadState: function (inst, stateData, animate) {
stateData = $.layout.transformData( stateData ); // panes = default subkey
$.extend( true, inst.options, stateData ); // update layout options
// if layout has already been initialized, then UPDATE layout state
if (inst.state.initialized) {
var pane, o, s, h, c
, noAnimate = (animate===false);
$.each($.layout.state.config.allPanes.split(","), function (idx, pane) {
o = stateData[ pane ];
if (typeof o != 'object') return; // no key, continue
s = o.size;
c = o.initClosed;
h = o.initHidden;
if (s > 0 || s=="auto") inst.sizePane(pane, s, false, null, noAnimate); // will animate resize if option enabled
if (h === true) inst.hide(pane, a);
else if (c === false) inst.open (pane, false, noAnimate);
else if (c === true) inst.close(pane, false, noAnimate);
else if (h === false) inst.show (pane, false, noAnimate);
});
}
}
/**
* Get the *current layout state* and return it as a hash
*
* @param {Object=} inst
* @param {(string|Array)=} keys
*/
, readState: function (inst, keys) {
var
data = {}
, alt = { isClosed: 'initClosed', isHidden: 'initHidden' }
, state = inst.state
, pair, pane, key, val
;
if (!keys) keys = inst.options.stateManagement.stateKeys; // if called by user
if ($.isArray(keys)) keys = keys.join(",");
// convert keys to an array and change delimiters from '__' to '.'
keys = keys.replace(/__/g, ".").split(',');
// loop keys and create a data hash
for (var i=0, n=keys.length; i < n; i++) {
pair = keys[i].split(".");
pane = pair[0];
key = pair[1];
if ($.layout.state.config.allPanes.indexOf(pane) < 0) continue; // bad pane!
val = state[ pane ][ key ];
if (val == undefined) continue;
if (key=="isClosed" && state[pane]["isSliding"])
val = true; // if sliding, then *really* isClosed
( data[pane] || (data[pane]={}) )[ alt[key] ? alt[key] : key ] = val;
}
return data;
}
/**
* Stringify a JSON hash so can save in a cookie or db-field
*/
, encodeJSON: function (JSON) {
return parse(JSON);
function parse (h) {
var D=[], i=0, k, v, t; // k = key, v = value
for (k in h) {
v = h[k];
t = typeof v;
if (t == 'string') // STRING - add quotes
v = '"'+ v +'"';
else if (t == 'object') // SUB-KEY - recurse into it
v = parse(v);
D[i++] = '"'+ k +'":'+ v;
}
return '{'+ D.join(',') +'}';
};
}
/**
* Convert stringified JSON back to a hash object
* @see $.parseJSON(), adding in jQuery 1.4.1
*/
, decodeJSON: function (str) {
try { return $.parseJSON ? $.parseJSON(str) : window["eval"]("("+ str +")") || {}; }
catch (e) { return {}; }
}
, _create: function (inst) {
// ADD State-Management plugin methods to inst
$.extend( inst, {
// readCookie - update options from cookie - returns hash of cookie data
readCookie: function () { return $.layout.state.readCookie(inst); }
// deleteCookie
, deleteCookie: function () { $.layout.state.deleteCookie(inst); }
// saveCookie - optionally pass keys-list and cookie-options (hash)
, saveCookie: function (keys, cookieOpts) { return $.layout.state.saveCookie(inst, keys, cookieOpts); }
// loadCookie - readCookie and use to loadState() - returns hash of cookie data
, loadCookie: function () { return $.layout.state.loadCookie(inst); }
// loadState - pass a hash of state to use to update options
, loadState: function (stateData, animate) { $.layout.state.loadState(inst, stateData, animate); }
// readState - returns hash of current layout-state
, readState: function (keys) { return $.layout.state.readState(inst, keys); }
// add JSON utility methods too...
, encodeJSON: $.layout.state.encodeJSON
, decodeJSON: $.layout.state.decodeJSON
});
// init state.stateData key, even if plugin is initially disabled
inst.state.stateData = {};
// read and load cookie-data per options
var oS = inst.options.stateManagement;
if (oS.enabled) {
if (oS.autoLoad) // update the options from the cookie
inst.loadCookie();
else // don't modify options - just store cookie data in state.stateData
inst.state.stateData = inst.readCookie();
}
}
, _unload: function (inst) {
var oS = inst.options.stateManagement;
if (oS.enabled) {
if (oS.autoSave) // save a state-cookie automatically
inst.saveCookie();
else // don't save a cookie, but do store state-data in state.stateData key
inst.state.stateData = inst.readState();
}
}
};
// add state initialization method to Layout's onCreate array of functions
$.layout.onCreate.push( $.layout.state._create );
$.layout.onUnload.push( $.layout.state._unload );
/**
* @preserve jquery.layout.buttons 1.0
* $Date: 2011-07-16 08:00:00 (Sat, 16 July 2011) $
*
* Copyright (c) 2010
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* @dependancies: UI Layout 1.3.0.rc30.1 or higher
*
* @support: http://groups.google.com/group/jquery-ui-layout
*
* Docs: [ to come ]
* Tips: [ to come ]
*/
// tell Layout that the state plugin is available
$.layout.plugins.buttons = true;
// Add buttons options to layout.defaults
$.layout.defaults.autoBindCustomButtons = false;
// Specify autoBindCustomButtons as a layout-option, NOT a pane-option
$.layout.optionsMap.layout.push("autoBindCustomButtons");
/*
* Button methods
*/
$.layout.buttons = {
// set data used by multiple methods below
config: {
borderPanes: "north,south,west,east"
}
/**
* Searches for .ui-layout-button-xxx elements and auto-binds them as layout-buttons
*
* @see _create()
*/
, init: function (inst) {
var pre = "ui-layout-button-"
, layout = inst.options.name || ""
, name;
$.each("toggle,open,close,pin,toggle-slide,open-slide".split(","), function (i, action) {
$.each($.layout.buttons.config.borderPanes.split(","), function (ii, pane) {
$("."+pre+action+"-"+pane).each(function(){
// if button was previously 'bound', data.layoutName was set, but is blank if layout has no 'name'
name = $(this).data("layoutName") || $(this).attr("layoutName");
if (name == undefined || name === layout)
inst.bindButton(this, action, pane);
});
});
});
}
/**
* Helper function to validate params received by addButton utilities
*
* Two classes are added to the element, based on the buttonClass...
* The type of button is appended to create the 2nd className:
* - ui-layout-button-pin
* - ui-layout-pane-button-toggle
* - ui-layout-pane-button-open
* - ui-layout-pane-button-close
*
* @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
* @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
* @return {Array.<Object>} If both params valid, the element matching 'selector' in a jQuery wrapper - otherwise returns null
*/
, get: function (inst, selector, pane, action) {
var $E = $(selector)
, o = inst.options
, err = o.showErrorMessages
, lang= $.layout.language
;
if (!$E.length) { // element not found
if (err) alert(lang.errButton + lang.selector +": "+ selector);
}
else if ($.layout.buttons.config.borderPanes.indexOf(pane) === -1) { // invalid 'pane' sepecified
if (err) alert(lang.errButton + lang.pane +": "+ pane);
$E = $(""); // NO BUTTON
}
else { // VALID
var btn = o[pane].buttonClass +"-"+ action;
$E .addClass( btn +" "+ btn +"-"+ pane )
.data("layoutName", o.name); // add layout identifier - even if blank!
}
return $E;
}
/**
* NEW syntax for binding layout-buttons - will eventually replace addToggle, addOpen, etc.
*
* @param {(string|!Object)} sel jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
* @param {string} action
* @param {string} pane
*/
, bind: function (inst, sel, action, pane) {
var _ = $.layout.buttons;
switch (action.toLowerCase()) {
case "toggle": _.addToggle (inst, sel, pane); break;
case "open": _.addOpen (inst, sel, pane); break;
case "close": _.addClose (inst, sel, pane); break;
case "pin": _.addPin (inst, sel, pane); break;
case "toggle-slide": _.addToggle (inst, sel, pane, true); break;
case "open-slide": _.addOpen (inst, sel, pane, true); break;
}
return inst;
}
/**
* Add a custom Toggler button for a pane
*
* @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
* @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
* @param {boolean=} slide true = slide-open, false = pin-open
*/
, addToggle: function (inst, selector, pane, slide) {
$.layout.buttons.get(inst, selector, pane, "toggle")
.click(function(evt){
inst.toggle(pane, !!slide);
evt.stopPropagation();
});
return inst;
}
/**
* Add a custom Open button for a pane
*
* @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
* @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
* @param {boolean=} slide true = slide-open, false = pin-open
*/
, addOpen: function (inst, selector, pane, slide) {
$.layout.buttons.get(inst, selector, pane, "open")
.attr("title", $.layout.language.Open)
.click(function (evt) {
inst.open(pane, !!slide);
evt.stopPropagation();
});
return inst;
}
/**
* Add a custom Close button for a pane
*
* @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
* @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
*/
, addClose: function (inst, selector, pane) {
$.layout.buttons.get(inst, selector, pane, "close")
.attr("title", $.layout.language.Close)
.click(function (evt) {
inst.close(pane);
evt.stopPropagation();
});
return inst;
}
/**
* Add a custom Pin button for a pane
*
* Four classes are added to the element, based on the paneClass for the associated pane...
* Assuming the default paneClass and the pin is 'up', these classes are added for a west-pane pin:
* - ui-layout-pane-pin
* - ui-layout-pane-west-pin
* - ui-layout-pane-pin-up
* - ui-layout-pane-west-pin-up
*
* @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
* @param {string} pane Name of the pane the pin is for: 'north', 'south', etc.
*/
, addPin: function (inst, selector, pane) {
var $E = $.layout.buttons.get(inst, selector, pane, "pin");
if ($E.length) {
var s = inst.state[pane];
$E.click(function (evt) {
$.layout.buttons.setPinState(inst, $(this), pane, (s.isSliding || s.isClosed));
if (s.isSliding || s.isClosed) inst.open( pane ); // change from sliding to open
else inst.close( pane ); // slide-closed
evt.stopPropagation();
});
// add up/down pin attributes and classes
$.layout.buttons.setPinState(inst, $E, pane, (!s.isClosed && !s.isSliding));
// add this pin to the pane data so we can 'sync it' automatically
// PANE.pins key is an array so we can store multiple pins for each pane
s.pins.push( selector ); // just save the selector string
}
return inst;
}
/**
* Change the class of the pin button to make it look 'up' or 'down'
*
* @see addPin(), syncPins()
* @param {Array.<Object>} $Pin The pin-span element in a jQuery wrapper
* @param {string} pane These are the params returned to callbacks by layout()
* @param {boolean} doPin true = set the pin 'down', false = set it 'up'
*/
, setPinState: function (inst, $Pin, pane, doPin) {
var updown = $Pin.attr("pin");
if (updown && doPin === (updown=="down")) return; // already in correct state
var
pin = inst.options[pane].buttonClass +"-pin"
, side = pin +"-"+ pane
, UP = pin +"-up "+ side +"-up"
, DN = pin +"-down "+side +"-down"
, lang = $.layout.language
;
$Pin
.attr("pin", doPin ? "down" : "up") // logic
.attr("title", doPin ? lang.Unpin : lang.Pin)
.removeClass( doPin ? UP : DN )
.addClass( doPin ? DN : UP )
;
}
/**
* INTERNAL function to sync 'pin buttons' when pane is opened or closed
* Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes
*
* @see open(), close()
* @param {string} pane These are the params returned to callbacks by layout()
* @param {boolean} doPin True means set the pin 'down', False means 'up'
*/
, syncPinBtns: function (inst, pane, doPin) {
// REAL METHOD IS _INSIDE_ LAYOUT - THIS IS HERE JUST FOR REFERENCE
$.each(state[pane].pins, function (i, selector) {
$.layout.buttons.setPinState(inst, $(selector), pane, doPin);
});
}
, _load: function (inst) {
// ADD Button methods to Layout Instance
$.extend( inst, {
bindButton: function (selector, action, pane) { return $.layout.buttons.bind(inst, selector, action, pane); }
// DEPRECATED METHODS...
, addToggleBtn: function (selector, pane, slide) { return $.layout.buttons.addToggle(inst, selector, pane, slide); }
, addOpenBtn: function (selector, pane, slide) { return $.layout.buttons.addOpen(inst, selector, pane, slide); }
, addCloseBtn: function (selector, pane) { return $.layout.buttons.addClose(inst, selector, pane); }
, addPinBtn: function (selector, pane) { return $.layout.buttons.addPin(inst, selector, pane); }
});
// init state array to hold pin-buttons
for (var i=0; i<4; i++) {
var pane = $.layout.buttons.config.borderPanes[i];
inst.state[pane].pins = [];
}
// auto-init buttons onLoad if option is enabled
if ( inst.options.autoBindCustomButtons )
$.layout.buttons.init(inst);
}
, _unload: function (inst) {
// TODO: unbind all buttons???
}
};
// add initialization method to Layout's onLoad array of functions
$.layout.onLoad.push( $.layout.buttons._load );
//$.layout.onUnload.push( $.layout.buttons._unload );
})( jQuery );</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Backend.html">Backend</a></li><li><a href="CBObject.html">CBObject</a></li><li><a href="CBSection.html">CBSection</a></li><li><a href="TextBox.html">TextBox</a></li><li><a href="UI.html">UI</a></li></ul><h3>Namespaces</h3><ul><li><a href="application.backend.html">backend</a></li><li><a href="application.controller.html">controller</a></li><li><a href="Cloudbook.html">Cloudbook</a></li><li><a href="Cloudbook.Actions.html">Actions</a></li><li><a href="Cloudbook.Sections.html">Sections</a></li><li><a href="Cloudbook.UI.html">UI</a></li><li><a href="Project.html">Project</a></li><li><a href="Project.Data.html">Data</a></li><li><a href="Project.Info.html">Info</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ConfigUserManager">ConfigUserManager</a></li><li><a href="global.html#Controller">Controller</a></li><li><a href="global.html#deepEqual">deepEqual</a></li><li><a href="global.html#equal">equal</a></li><li><a href="global.html#notDeepEqual">notDeepEqual</a></li><li><a href="global.html#notEqual">notEqual</a></li><li><a href="global.html#notPropEqual">notPropEqual</a></li><li><a href="global.html#notStrictEqual">notStrictEqual</a></li><li><a href="global.html#ok">ok</a></li><li><a href="global.html#propEqual">propEqual</a></li><li><a href="global.html#StorageManager">StorageManager</a></li><li><a href="global.html#strictEqual">strictEqual</a></li><li><a href="global.html#Translator">Translator</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-beta3</a> on Mon Mar 23 2015 16:46:33 GMT+0100 (CET)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>