9 'include/browserDetect',
10 'remoto!stdlib:js/include/utils.js',
11 'remoto!stdlib:js/include/keyboard.js',
12 'include/modal/modal',
13 "remoto!stdlib:js/paneManager/paneMenu.js",
14 'remoto!stdlib:js/include/objectRegistry.js',
15 'remoto!stdlib:js/include/preferences.js',
16 'remoto!stdlib:js/panes/panes/paneLoader.js',
17 'remoto!stdlib:js/panes/panes/paneLoader.svg',
18 'remoto!stdlib:js/paneManager/images/icons/mergeSplitter.gif',
19 'remoto!stdlib:js/paneManager/images/icons/splitHorizontal.gif',
20 'remoto!stdlib:js/paneManager/images/icons/splitVertical.gif',
21 'jquery/ui/jquery.ui.tabs2',
22 'remoto!stdlib:js/paneManager/paneManager.css',
25 function(require,browserDetect,
utils,
keyboard,modal,
menuManager,
objectRegistry,
preferences,
paneLoader,paneLoaderImg,mergeSplitterImg,splitHorizontalImg,splitVerticalImg)
29 var _paneManager =
null;
60 this._primaryCell =
null;
61 this._currentPane =
null;
62 this._singlePane =
false;
63 this._singlePaneBorderless =
false;
64 this._singlePaneSelected = -1;
65 this._nonSingleLayout =
null;
66 this._firstLoadFlag =
true;
67 this._interfacePath =
null;
85 $(window).bind(
"resize", this.
resize.bind(
this) );
86 $(document).bind(
"contextmenu",
false );
106 this._primaryCell =
null;
107 this._currentPane =
null;
108 this._singlePane =
false;
109 this._singlePaneBorderless =
false;
110 this._singlePaneSelected = -1;
111 this._nonSingleLayout =
null;
112 this._firstLoadFlag =
true;
118 $(window).unbind(
"resize");
119 $(window).bind(
"resize", this.
resize.bind(
this) );
135 set config(c) {
return this._config = c; },
143 get config() {
return this._config; },
170 console.warn(
"Received null layout update. Returning.");
278 for (var p in this._panes)
279 if (this._panes[p]._parent)
280 this._panes[p].detach();
283 for (var i=0;i<
tabs.tabsSelectMenus.length;i++)
285 tabs.tabsSelectMenus = [];
286 for (var i=0;i<
tabswitcher.tabswitcherSelectMenus.length;i++)
292 if (this._singlePane && this._firstLoadFlag)
293 this._root._selected = this._singlePaneSelected;
296 if (_layout.singlePane &&
this._firstLoadFlag)
298 this._singlePaneSelected = _layout.singlePaneSelected;
300 if (_layout.singlePaneBorderless)
309 this._firstLoadFlag =
false;
312 if (!(this._root instanceof
pane))
319 this._jq = this._root.createHTML();
322 $(window.paneManagerTag ||
"body").append(this._jq);
325 this._root.activate();
328 if (!this._primaryCell)
329 this._primaryCell = this._root.find(
null,
tabs);
354 for (var p in this._panes)
357 _destroy.push(
this._panes[p] );
359 _attach.push( this._panes[p] );
365 _destroy.forEach(
function(o) { o.destroy(); } );
366 _attach.forEach(
function(o) { o.attach(); } );
379 this._nonSingleLayout =
null;
380 this._interfacePath =
path;
414 var l = this._singlePane ? this._nonSingleLayout : this._root.saveLayout();
416 if (this._singlePane)
419 l.singlePaneSelected = this._root._selected;
420 l.singlePaneBorderless = this._singlePaneBorderless;
447 this._primaryCell =
null;
454 case "tabswitcher": _node =
new tabswitcher(_layout);
break;
455 case "splitter": _node =
new splitter(_layout);
break;
456 case "tabs": _node =
new tabs(_layout);
break;
457 case "pane": _node = this.
fetchPane(_layout);
459 _node._parent =
true;
462 default: _node = this.
fetchPane(_layout);
472 { console.warn(
"Unknown paneManager pane type: '"+_layout.type+
"'" );
473 console.log(_layout);
542 { this._panes[
id].applySettings(c);
543 return this._panes[
id];
546 return new pane(c,o);
564 if (arguments.length < 2)
570 var t = c.metadata ? c.metadata.type : c.type;
573 if (this._panes[t][
id])
574 if (this._panes[t][
id][index])
575 return this._panes[t][
id][index];
683 for (var i in this._panes)
684 l.push( this._panes[l]._path );
727 delete this._panes[
id];
733 throw "Registered pane matching object with id='"+
id+
"' was not found.";
844 case "modalForm": this.
openModalForm( _template.path, _template.form, _template.title ||
utils.
fileNameFromPath(_template.path), _template.size, context,
metadata, _template.accept ||
"Submit", _template.dismiss ||
"Close" );
847 case "nearest":
if (
metadata.sourcepane)
852 var p =
metadata.sourcepane._parent;
860 var k = _template.path || _template.id || _template.name;
866 if (n._parent && n._parent.selectTabHandler)
868 n._parent.selectTabHandler(n);
879 break containerSelector;
903 t._children.push( l );
904 t._selected = t._children.length - 1;
920 { console.error(
"Don't have a main tabswitcher to attach to... skipping template request.");
921 console.log(arguments);
941 size = size || { width:700, height:400 };
942 size.width = Math.max( size.width || 0, 200 );
943 if (size.height !==
"expand")
944 size.height = Math.max( size.height || 0, 100 );
946 var
resize = size.resize ===
false ? false :
true;
951 "dismiss":
function()
953 if (PP && PP.destroy)
961 exec:
function(_modal)
972 var buttons = {
"Close":
function() {
return _modal.execEvent(
"dismiss"); } };
974 var w = modal.createWindow(_modal,size.width || 700,size.height || 400,title,
resize,buttons,
"Close",
"Close");
978 w.content.append( p.createHTML() );
980 w.content.bind(
"paneloaded",
function(evt,p) {
982 if (p._object && p._object._help)
987 var h = $(
"<span class='ui-icon ui-icon-info' style='display:inline-block; position:absolute; top:5px; right:5px' />");
990 mouseenter:
function() { h.addClass(
"ui-state-hover");
return false; },
991 mouseleave:
function() { h.removeClass(
"ui-state-hover");
return false; },
994 if (typeof p._object._help ===
"string")
995 modal.alert( p._object._help,
false,
"Help" );
996 else if (typeof p._object._help ===
"function")
1012 modal.exec( m, events,
true );
1033 size = size || { width:700, height:400 };
1034 size.width = Math.max( size.width || 0, 200 );
1035 if (size.height !==
"expand")
1036 size.height = Math.max( size.height || 0, 100 );
1038 var
resize = size.resize ===
false ? false :
true;
1041 accept = accept ||
"Submit";
1042 dismiss = dismiss ||
"Close";
1045 "dismiss":
function(data) {
1047 if (data !==
"loaderCallback")
1052 "submit":
function(values) {
1059 case "submit": THIS.pathSubmitCallback( c );
1064 case "create": THIS.pathCreateCallback( c );
1071 default: console.warn(
"no metadata.action provided... assuming 'create', and skipping callback",
metadata);
1072 THIS.pathCreateCallback( c );
1083 exec:
function(_modal)
1085 var p = _paneManager.objectFactory( {
type:
"form" }, loadedCallback);
1090 buttons[accept] =
function()
1092 var
valid = p.validate();
1094 return _modal.execEvent(
"submit",p.getValues());
1099 buttons[dismiss] =
function()
1101 return _modal.execEvent(
"dismiss");
1104 var w = modal.createWindow(_modal,size.width || 700,size.height || 400,title,
resize,buttons,accept,dismiss,p._help);
1106 w.content.append( $(
"<div class='pane'>").append( p.createHTML() ) );
1108 p.applyDiff(
form );
1110 w.content.find(
"input[type=text]").first().focus();
1115 function loadedCallback()
1119 mo.execEvent(
"dismiss",
"loaderCallback");
1120 modal.exec( m, events,
true );
1123 var mo = modal.exec( m, events,
true );
1137 this._root.resize();
1176 layout = layout || {children:[]};
1179 this._name = layout.name ||
"Tabswitcher";
1181 this._icon = layout.icon ||
null;
1182 this._title = layout.title ||
null;
1184 this._menuButton =
null;
1185 this._parent =
null;
1186 this._activated =
false;
1187 this._trigger = layout.trigger;
1188 this._selected = layout.selected || 0;
1189 this._selected = Math.min(this._selected,this._children.length-1);
1190 this._sortable = layout.sortable ===
false ? false :
true;
1191 this._showMenu = layout.showMenu ===
false ? false :
true;
1192 this._tabContextMenus = layout.tabContextMenus ===
false ? false :
true;
1194 this._borderless = layout.borderless ||
false;
1198 var closeIcon =
"<span class='paneMenuIcon' class='test test'><svg xmlns='http://www.w3.org/2000/svg' fill='var(--FontColorMain)' viewBox='0 0 14 14'><g><polygon points='11.58 5.5 9.08 2.99 6.75 5.32 4.42 2.99 1.92 5.5 4.25 7.82 1.92 10.15 4.42 12.66 6.75 10.33 9.08 12.66 11.58 10.15 9.25 7.82 11.58 5.5'/></g></svg></span>";
1202 _paneManager._primaryCell =
this;
1206 tabswitcher.tabswitcherSelectMenus.push(
"__tabswitcherSelectMenu_"+this._tid);
1222 label:
"Close Current Tab",
1225 test:
function() {
return tabswitcher.currentTab._children.length>0; },
1239 label:
"Close All Tabs",
1242 test:
function() {
return tabswitcher.currentTab._children.length>0; },
1247 m.addSubMenu(
"Select Tab",
tabswitcher.currentSelectTabswitcherMenuID,
"<span class='paneMenuIcon'></span>" );
1275 tabswitcher.currentSelectTabswitcherMenuID =
function() {
return "__tabswitcherSelectMenu_"+
tabswitcher.currentTab._tid; };
1291 if (this._html)
return this._html;
1293 var n = $(
"<div class='tabswitcher' id='"+this._tid+
"'/>");
1294 var t = $(
"<ul class='tabswitcher-header'/>");
1297 "box-shadow":
"inset 0px -2px 2px var(--ShadowColor)",
1298 "-webkit-box-shadow":
"inset 0px -2px 2px var(--ShadowColor)",
1300 t.data(
"tabswitcherPane",
this);
1304 var b = $(
"<div class='tabsmenu'>").
html(
"<span>▾</span>");
1305 b.bind(
"click", this.
openMenu.bind(
this));
1308 if (!this._showMenu)
1314 for (var i=0;i<this._children.length;i++)
1316 c = this._children[i];
1317 var cn = c._name.substring(0,30);
1318 cn =
"<div class='tabLabel'>" + cn +
"</div>";
1325 if(c._icon.startsWith(
"data:image/svg+xml;utf8,"))
1327 tt = c._icon.replace(
"data:image/svg+xml;utf8,",
"") + cn;
1332 tt = ((c._icon?
"<img src='"+c._icon+
"' />"+cn:cn)||
"[unnamed]");
1338 j = $(
"<li><"+
tabswitcher.TAG+
" href='#"+c._tid+
"'>"+tt+
"</a></li>");
1340 j = $(
"<li><"+
tabswitcher.TAG+
" id='tab_"+c._tid+
"' href='#"+c._tid+
"'>"+tt+
"</a></li>");
1341 j.attr(
"title",c._title);
1345 n.append( c.createHTML() );
1359 this._menuButton = b;
1379 children = children || [];
1381 for (var i=0; i<children.length; i++)
1388 case "splitter": p =
new splitter(c);
break;
1389 case "tabs": p =
new tabs(c);
break;
1390 case "pane": p = _paneManager.fetchPane(c);
break;
1391 default: p = _paneManager.fetchPane(c);
break;
1400 console.warn(
"Unknown tabswitcher pane type: '"+c.type+
"'" );
1416 for (var i=0;i<this._children.length;i++)
1419 if (this._activated)
return;
1423 this._html.tabs2( { event:
"mousedown",
1424 active: this._selected,
1425 add:
function(event, ui) {
1426 $(
tabswitcher.TABS+
"[href="+ui.tab.hash+
"]").trigger(
"click");
1429 TABS._selected = TABS._html.tabs2(
"option",
"active");
1430 _paneManager.saveLayout();
1434 if ( TABS._children[TABS._selected] )
1435 { var p = _paneManager._currentPane = TABS._children[TABS._selected];
1437 if (p.triggerCurrentPane)
1438 p.triggerCurrentPane();
1443 this._html.find(
".ui-tabs2-panel" ).css( {top:
"",bottom:
""} );
1444 if (this._borderless)
1445 this._html.find(
"[aria-hidden=false]" ).css( {top:
"0px",bottom:
"0px"} );
1449 this._html.children(
"ul.ui-tabs2-nav").sortable( {
1460 containment:
'parent',
1461 placeholder:
"tabs-placeholder",
1462 forcePlaceholderSize:
true,
1463 start:
function(event,ui)
1465 _paneManager.__tabswitcherStartIndex = ui.item.index() - 1;
1467 stop:
function(event,ui)
1469 var oldIndex = _paneManager.__tabswitcherStartIndex;
1470 var newIndex = ui.item.index() - 1;
1472 if (oldIndex == newIndex)
return;
1474 var s = TABS._children[TABS._selected];
1477 var item = TABS._children.splice( oldIndex, 1 );
1478 TABS._children.splice( newIndex, 0, item[0] );
1481 for (TABS._selected=0;TABS._children[TABS._selected]!==s;TABS._selected++);
1484 _paneManager.applyLayout( _paneManager.saveLayout());
1488 this._html.children(
"ul.ui-tabs2-nav").bind(
"contextmenu",
function(e)
1489 { _paneManager._primaryCell =
tabswitcher.currentTab = TABS;
1495 if (this._tabContextMenus)
1496 this._html.children(
"ul.ui-tabs2-nav").children(
"li").bind(
"contextmenu",
function(e)
1498 var t = $(e.currentTarget);
1499 var i = t.index() - 1;
1507 this._html.bind(
"triggerNavigation",
function(e,dir)
1512 var i = TABS._selected;
1516 case "previous": i--;
1518 TABS._html.tabs2(
"option",
"active", i );
1520 TABS._html.parent().trigger(
"triggerNavigation",
"previous");
1525 if (i < TABS._children.length)
1526 TABS._html.tabs2(
"option",
"active", i );
1528 TABS._html.parent().trigger(
"triggerNavigation",
"next");
1531 default: console.warn(
"bad navigation direction!");
1532 console.warn(arguments);
1539 this._activated =
true;
1552 for (var i=0;i<this._children.length;i++)
1557 this._activated =
false;
1572 for (var t in this._trigger)
1576 case "select":
switch(this._trigger[t])
1578 case "first": this._html.tabs2(
"option",
"active", 0 );
break;
1579 case "next": console.log(
"next tab!");
break;
1580 case "previous": console.log(
"previous tab!");
break;
1590 this._html.trigger(
"triggerCurrentPane", this._trigger);
1593 var t = this._children[this._selected];
1595 if (t.triggerCurrentPane)
1597 t.triggerCurrentPane();
1633 modal.prompt(
"Enter a name for the new tab:",
1635 THIS.addTab.bind(THIS)
1657 this._children.push( t );
1658 this._selected = this._children.length - 1;
1659 _paneManager.applyLayout( _paneManager.saveLayout() );
1673 var t = ts._children[ts._selected];
1676 _paneManager.applyLayout( _paneManager.saveLayout() );
1691 _paneManager.applyLayout( _paneManager.saveLayout() );
1704 THIS._children = [];
1705 _paneManager.applyLayout( _paneManager.saveLayout() );
1727 var i = this._children.indexOf(tab);
1730 this._children.splice(i,1);
1731 this._selected = Math.min(this._selected,this._children.length-1);
1734 console.warn(
"Could not find tab!",tab);
1749 var i = this._children.indexOf(p);
1751 this._html.tabs2(
"option",
"active", i );
1766 var c = THIS._children[THIS._selected];
1767 modal.prompt(
"Enter a new name for this tab:",
1771 THIS._html.find(
"#tab_"+c._id).html(
name);
1772 _paneManager.applyLayout( _paneManager.saveLayout() );
1801 for (var i=0;i<this._children.length;i++)
1802 { c = this._children[i];
1803 ch.push( c.saveLayout() );
1806 var l = {
name: this._name,
1807 type:
"tabswitcher",
1814 if (!this._showMenu) l.showMenu =
false;
1815 if (!this._tabContextMenus) l.tabContextMenus =
false;
1816 if (this._title) l.title = this._title;
1821 if (this._trigger) l.trigger = this._trigger;
1822 if (!this._sortable) l.sortable =
false;
1844 for(var i=0;i<this._children.length;i++)
1846 var f = this._children[i].find(p,
type);
1864 for (var i=0;i<this._children.length;i++)
1865 this._children[i].
resize();
1879 for (var i=0;i<this._children.length;i++)
1880 this._children[i].
attach();
1893 for (var i=0;i<this._children.length;i++)
1894 this._children[i].
detach();
1907 for (var i=0;i<this._children.length;i++)
1910 this._html.detach();
1912 this._children = [];
1928 var i = this._children.indexOf(oldChild);
1932 this._children[i] = newChild;
1933 newChild._parent =
this;
2002 layout = layout || {children:[]};
2006 this._name = layout.name ||
"(unnamed)";
2007 this._icon = layout.icon ||
null;
2008 this._title = layout.title ||
null;
2009 this._stacking = layout.stacking ||
"horizontal";
2010 this._showHandles = (layout.handles ===
false) ?
false :
true;
2011 this._sizes = layout.sizes || (
function(){ var s = 1/(Math.min(layout.children.length,1));
return Array.apply(
null, Array(5)).map(Number.prototype.valueOf,s); })();
2012 this._classes = layout.classes || [];
2013 this._fixedSize = layout.fixedSize ||
false;
2016 this._activated =
false;
2033 if (this._html)
return this._html;
2035 var p = $(
"<div class='pane' id='"+this._tid+
"'/>");
2036 var n = $(
"<div class='splitter'/>");
2039 switch(this._stacking)
2041 case "horizontal": r = n.append(
"<div class='ui-row'/>").find(
".ui-row");
2042 for (var i=0;i<this._children.length;i++)
2044 if (i!==0) r.append(
"<div class='ui-cell splitterHandle splitterHandleH' style='cursor:col-resize;'/>" );
2046 h = $(
"<div class='ui-cell'/>").append(this._children[i].
createHTML());
2048 h.css( { width:this._sizes[i] } );
2049 if(this._classes[i])
2050 h.addClass( this._classes[i] );
2056 case "vertical":
for (var i=0;i<this._children.length;i++)
2058 if (i!==0) n.append(
"<div class='ui-row' style='height:0px;'><div class='ui-cell splitterHandle splitterHandleV' style='cursor:row-resize;'/></div>" );
2060 r = $(
"<div class='ui-cell'/>").append(this._children[i].
createHTML());
2062 r.css( { height:this._sizes[i] } );
2063 if (this._classes[i])
2064 r.addClass( this._classes[i] );
2065 n.append( $(
"<div class='ui-row'/>").append(r) );
2070 default: console.log(
"Bad split stacking: '"+this._stacking+
"'");
2099 children = children || [];
2101 for (var i=0; i<children.length; i++)
2108 case "tabswitcher": p =
new tabswitcher(c);
break;
2110 case "tabs": p =
new tabs(c);
break;
2111 case "pane": p = _paneManager.fetchPane(c);
break;
2112 default: p = _paneManager.fetchPane(c);
break;
2121 console.warn(
"Unknown splitter pane type: '"+c.type+
"'" );
2140 var i = this._children.indexOf(oldChild);
2144 this._children[i] = newChild;
2161 for (var i=0;i<this._children.length;i++)
2164 if (this._activated)
return;
2166 if (!this._fixedSize)
2167 this._html.children(
".splitter").children(
".ui-row").children(
".splitterHandle").bind(
"mousedown", {
splitter:
this}, this.
handleFunction);
2169 this._html.children(
".splitter").children(
".ui-row").children(
".splitterHandle").addClass(
"splitterHandle-noresize");
2171 if (!this._showHandles)
2173 this._html.children(
".splitter").children(
".ui-row").children(
".splitterHandle").css(
"display",
"none");
2175 this._activated =
true;
2188 for (var i=0;i<this._children.length;i++)
2193 this._activated =
false;
2208 var SPLITTER = e.data.splitter;
2211 $(THIS).addClass(
"splitterHandleHighlight");
2213 var index = (SPLITTER._stacking ===
"horizontal") ? $(
this).index() : $(
this).parent().index();
2214 index = Math.ceil((index-1)/2);
2216 var j1 = SPLITTER._jqs[index+0];
2217 var j2 = SPLITTER._jqs[index+1];
2219 var p1 = SPLITTER._sizes[index+0];
2220 var p2 = SPLITTER._sizes[index+1];
2227 var m1 = p1 ? ((p1.indexOf(
"%")>-1)?
"P":
"X") :
"N";
2228 var m2 = p2 ? ((p2.indexOf(
"%")>-1)?
"P":
"X") :
"N";
2231 p1 = p1 ? parseFloat(p1) : 0;
2232 p2 = p2 ? parseFloat(p2) : 0;
2234 var
total,positionParam,cssParam;
2236 switch(SPLITTER._stacking)
2237 {
case "horizontal":
total = SPLITTER._html.width();
2238 if (m1===
"P") p1 = j1.width();
2239 if (m2===
"P") p2 = j2.width();
2240 if (m===
"NN") p1 = j1.width();
2241 positionParam =
"pageX";
2243 $(
"body").css(
"cursor",
"col-resize");
2246 case "vertical":
total = SPLITTER._html.height();
2247 if (m1===
"P") p1 = j1.height();
2248 if (m2===
"P") p2 = j2.height();
2249 if (m===
"NN") p1 = j1.height();
2250 positionParam =
"pageY";
2251 cssParam =
"height";
2252 $(
"body").css(
"cursor",
"row-resize");
2256 var s = e[positionParam];
2260 var mm =
function(e)
2262 d = s-e[positionParam];
2270 case "PP":
if (p1-d>0 && p2+d>0)
2271 { s1 = ((p1-d)/
total).toFixed(4)*100+
"%";
2272 s2 = ((p2+d)/
total).toFixed(4)*100+
"%";
2273 j1.css( cssParam, s1 );
2274 j2.css( cssParam, s2 );
2277 case "PX":
if (p1-d>0 && p2+d>0)
2278 { s1 = ((p1-d)/
total).toFixed(4)*100+
"%";
2280 j1.css( cssParam, s1 );
2281 j2.css( cssParam, s2 );
2285 case "PN":
if (p1-d>0)
2286 { s1 = ((p1-d)/
total).toFixed(4)*100+
"%";
2287 j1.css( cssParam, s1 );
2290 case "XP":
if (p1-d>0 && p2+d>0)
2292 s2 = ((p2+d)/
total).toFixed(4)*100+
"%";
2293 j1.css( cssParam, s1 );
2294 j2.css( cssParam, s2 );
2297 case "XX":
if (p2+d>0 && p1-d>0)
2300 j1.css( cssParam, s1 );
2301 j2.css( cssParam, s2 );
2304 case "XN":
if (p1-d > 0)
2306 j1.css( cssParam, s1 );
2309 case "NP":
if (p2+d > 0)
2310 { s2 = ((p2+d)/
total).toFixed(4)*100+
"%";
2311 j2.css( cssParam, s2 );
2314 case "NX":
if (p2+d > 0)
2316 j2.css( cssParam, s2 );
2323 e.stopPropagation();
2327 var mu =
function(e)
2331 $(
'body').unbind(
"mousemove",mm);
2332 $(
'body').unbind(
"mouseup mouseleave",mu);
2333 $(
'body').children(
".splitterMask").remove();
2340 case "XX": SPLITTER._sizes[index+0] = s1;
2341 SPLITTER._sizes[index+1] = s2;
break;
2345 case "XN": SPLITTER._sizes[index+0] = s1;
break;
2348 case "NX": SPLITTER._sizes[index+1] = s2;
break;
2351 $(THIS).removeClass(
"splitterHandleHighlight");
2353 $(
"body").css(
"cursor",
"");
2355 _paneManager.saveLayout();
2358 e.stopPropagation();
2362 $(
'body').append(
"<div class='splitterMask'>");
2363 $(
'body').bind(
"mousemove",mm).bind(
"mouseup mouseleave",mu);
2366 e.stopPropagation();
2382 for (var i=0;i<this._children.length;i++)
2383 { c = this._children[i];
2384 ch.push( c.saveLayout() );
2390 var l = {
name: this._name,
2393 stacking: this._stacking,
2398 if (this._classes.length) l.classes = this._classes;
2399 if (this._icon) l.icon = this._icon;
2400 if (this._title) l.title = this._title;
2401 if (this._showHandles ===
false) l.handles =
false;
2402 if (this._fixedSize) l.fixedSize = this._fixedSize;
2426 for(var i=0;i<this._children.length;i++)
2428 var f = this._children[i].find(p,
type);
2446 for (var i=0;i<this._children.length;i++)
2447 this._children[i].
resize();
2461 for (var i=0;i<this._children.length;i++)
2462 this._children[i].
attach();
2475 for (var i=0;i<this._children.length;i++)
2476 this._children[i].
detach();
2489 for (var i=0;i<this._children.length;i++)
2490 { this._children[i]._parent =
null;
2491 this._children[i].destroy();
2493 this._children = [];
2495 if (this._parent instanceof
tabs || this._parent instanceof
tabswitcher)
2496 this._parent.removeTab(
this);
2499 this._html.detach();
2529 for (var i=0;i<this._children.length;i++)
2530 { c = this._children[i];
2531 if ((c instanceof
tabs) && (c!==t))
2550 var i = this._children.indexOf(child);
2551 var l = this._children.length;
2555 var t = (i<l-1) ? this._children[i+1] : this._children[i-1] ;
2557 if (!(t instanceof
tabs))
2559 if (!t)
return false;
2562 var c = this._children.splice(i,1);
2564 if (child._children)
2565 t._children = t._children.concat(child._children);
2568 t._name = this._name;
2570 if (_paneManager._primaryCell === child)
2571 _paneManager._primaryCell = t;
2574 if (this._children.length === 1)
2578 if ( this._parent.replaceChild(
this,t) )
2580 this._children = [];
2581 this._parent =
null;
2589 _paneManager._root = t;
2642 function tabs(layout)
2644 layout = layout || {children:[]};
2647 this._tid = layout.uuid ||
utils.
uuid();
2648 this._name = layout.name;
2649 this._icon = layout.icon ||
null;
2650 this._title = layout.title ||
null;
2653 this._menuButton =
null;
2654 this._parent =
null;
2655 this._activated =
false;
2656 this._trigger = layout.trigger;
2657 this._selected = layout.selected || 0;
2658 this._selected = Math.min(this._selected,this._children.length-1);
2659 this._layout = layout;
2660 this._borderless = layout.borderless ||
false;
2661 this._sortable = layout.sortable ===
false ? false :
true;
2662 this._showMenu = layout.showMenu ===
false ? false :
true;
2663 this._tabContextMenus = layout.tabContextMenus ===
false ? false :
true;
2670 var closeIcon =
"<span class='paneMenuIcon'><svg xmlns='http://www.w3.org/2000/svg' fill='var(--FontColorMain)' viewBox='0 0 14 14'><g><polygon points='11.58 5.5 9.08 2.99 6.75 5.32 4.42 2.99 1.92 5.5 4.25 7.82 1.92 10.15 4.42 12.66 6.75 10.33 9.08 12.66 11.58 10.15 9.25 7.82 11.58 5.5'/></g></svg></span>";
2673 _paneManager._primaryCell =
this;
2677 tabs.tabsSelectMenus.push(
"__tabsSelectMenu_"+this._id);
2704 label:
"Split Horizontally",
2707 test:
function() {
return !_paneManager._singlePane; },
2710 icon:
"<span class='paneMenuIcon'><svg fill='var(--FontColorMain)' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><g><rect style='opacity:0.75' x='1.04' y='1' width='5.96' height='11.98'/><rect style='opacity:0.25' x='7' y='1' width='5.96' height='11.98'/></g><path d='M0,0V14H14V0ZM13,7v6H1V1H13Z'/></svg></span>",
2713 label:
"Split Vertically",
2716 test:
function() {
return !_paneManager._singlePane; },
2719 icon:
"<span class='paneMenuIcon'><svg fill='var(--FontColorMain)' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><g><rect style='opacity:0.75' x='4.02' y='-1.98' width='5.96' height='11.98' transform='translate(11.01 -2.99) rotate(90)'/><rect style='opacity:0.25' x='4.02' y='3.98' width='5.96' height='11.98' transform='translate(16.97 2.97) rotate(90)'/></g><path d='M0,0V14H14V0ZM13,7v6H1V1H13Z'/></svg></span>",
2722 label:
"Unsplit Pane",
2728 icon:
"<span class='paneMenuIcon'><svg fill='var(--FontColorMain)' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'></defs><g><rect style='opacity:0.75' x='1.04' y='1' width='5.96' height='5.96'/><rect style='opacity:0.5' x='1.04' y='6.96' width='11.92' height='6'/><rect style='opacity:0.25' x='7' y='1' width='5.96' height='5.96'/></g><path d='M0,0V14H14V0ZM13,7v6H1V1H13Z'/></svg></span>",
2731 m.addItem(
"spacer");
2734 label:
"Close Current Tab",
2737 test:
function() {
return tabs.currentTab._children.length>0; },
2743 label:
"Close All Tabs",
2746 test:
function() {
return tabs.currentTab._children.length>0; },
2764 m.addSubMenu(
"Select Tab",
tabs.currentSelectTabMenuID,
"<span class='paneMenuIcon'></span>" );
2789 callback: this.
openHelp.bind(
this),
2790 test: this.
hasHelp.bind(
this),
2794 icon:
"<span class='paneMenuIcon'>?</span>",
2799 tabs.currentTab =
null;
2800 tabs.tabsSelectMenus = [];
2801 tabs.currentSelectTabMenuID =
function() {
return "__tabsSelectMenu_"+
tabs.currentTab._id; };
2817 if (this._html)
return this._html;
2819 var n = $(
"<div class='tabs' id='"+this._tid+
"'/>");
2822 t.data(
"tabsPane",
this);
2827 var b = $(
"<div class='tabsmenu'>").
html(
"<span>▾</span>");
2828 b.bind(
"click", this.
openMenu.bind(
this));
2831 if (!this._showMenu)
2837 for (var i=0;i<this._children.length;i++)
2839 c = this._children[i];
2840 var cn = c._name.substring(0,30);
2841 cn =
"<div class='tabLabel'>" + cn +
"</div>";
2851 if(c._icon.startsWith(
"data:image/svg+xml;utf8,"))
2853 tt = c._icon.replace(
"data:image/svg+xml;utf8,",
"") + cn;
2858 tt = ((c._icon?
"<img src='"+c._icon+
"' />"+cn:cn)||
"[unnamed]");
2863 j = $(
"<li><"+
tabs.TAG+
" href='#"+c._tid+
"'>"+tt+
"</a></li>");
2864 j.attr(
"title",c._title);
2867 n.append( c.createHTML() );
2881 this._menuButton = b;
2901 children = children || [];
2903 for (var i=0; i<children.length; i++)
2910 case "splitter": p =
new splitter(c);
break;
2911 case "tabs": p =
new tabs(c);
break;
2913 default: p = _paneManager.fetchPane(c);
break;
2954 console.error(
"Appended pane should not have a parent... something's wrong.");
2956 pane._parent =
this;
2957 this._children.push(
pane );
2963 if(c._icon.startsWith(
"data:image/svg+xml;utf8,"))
2965 tt = c._icon.replace(
"data:image/svg+xml;utf8,",
"") + cn;
2971 tt = ((c._icon?
"<img src='"+c._icon+
"' />"+cn:cn)||
"[unnamed]");
2975 var j = $(
"<li><"+
tabs.TAG+
" href='#"+
pane._tid+
"' title='"+
pane._path+
"'>"+tt+
"</a></li>" );
2976 j.appendTo( this._html.find(
".ui-tabs2-nav"));
2977 j.attr(
"title",
pane._title);
2978 j.data(
"pane",
pane);
2980 this._html.tabs2(
"refresh");
3009 var i = this._children.indexOf(tab);
3015 this._html.find(
".ui-tabs2-nav").children()[i].remove();
3016 this._html.children()[i+1].remove();
3017 this._html.tabs2(
"refresh");
3020 this._children.splice(i,1);
3022 var s = this._html.tabs2(
'option',
'active' );
3024 this._selected = Math.max(s,0);
3031 console.warn(
"TABS Could not find tab!",tab);
3046 index = Math.min(this._children.length,index);
3047 index = Math.max(0,index);
3049 if (index >= 0 && index<=this._children.length)
3054 tab._parent.removeTab(tab,
true);
3056 this._children.splice(index,0,tab);
3057 this._selected = index;
3058 _paneManager.applyLayout( _paneManager.saveLayout() );
3062 console.error(
"Tab placement was out of bounds: "+index);
3077 var i = this._children.indexOf(tab);
3087 index -= (i<index-1);
3088 this._children.splice(i,1);
3089 this._children.splice(index,0,tab);
3090 this._selected = index;
3091 _paneManager.applyLayout( _paneManager.saveLayout() );
3095 console.error(
"Tried to move pane which was not a child!");
3118 if(c._icon.startsWith(
"data:image/svg+xml;utf8,"))
3120 h = c._icon.replace(
"data:image/svg+xml;utf8,",
"") + cn;
3126 h = ((c._icon?
"<img src='"+c._icon+
"' />"+cn:cn)||
"[unnamed]");
3129 var i = this._children.indexOf(tab);
3132 this._html.find(
"ul > li > "+
tabs.TAG).eq(i).html(h);
3135 { console.warn(
"Could not rename tab:");
3151 tabs.currentTab =
this;
3152 _paneManager._primaryCell =
this;
3212 var THIS =
tabs.currentTab;
3214 var l = {
type:
"splitter",
3215 stacking:
"horizontal",
3217 sizes: [
"50%",
null],
3218 children: [ THIS.saveLayout(),
3227 if (THIS._parent.replaceChild( THIS, s ) )
3229 _paneManager.applyLayout( _paneManager.saveLayout() );
3232 console.warn(
"Could not find child of parent to replace!");
3245 var THIS =
tabs.currentTab;
3247 var l = {
type:
"splitter",
3248 stacking:
"vertical",
3250 sizes: [
"50%",
null],
3251 children: [ THIS.saveLayout(),
3260 if (THIS._parent.replaceChild( THIS, s ) )
3262 _paneManager.applyLayout( _paneManager.saveLayout() );
3265 console.error(
"Could not find child of parent to replace!");
3278 var THIS =
tabs.currentTab;
3280 if (THIS._parent.mergeOut(THIS))
3283 _paneManager.applyLayout( _paneManager.saveLayout() );
3286 console.error(
"Could not mergeOut the node!");
3302 var p = THIS._parent;
3304 if (!p)
return false;
3305 if (!(p instanceof
splitter))
return false;
3307 return p.containsTabsOtherThan(THIS);
3320 var tab =
tabs.currentTab;
3322 var t = typeof tab.help;
3325 modal.alert( tab.help,
false,
"Help" );
3326 else if (t ===
"function")
3341 var tab =
tabs.currentTab;
3343 if (tab instanceof
tabs)
3346 return (tab.hasHelp && tab.hasHelp());
3359 var ts =
tabs.currentTab;
3360 var t = ts._children[ts._selected];
3363 _paneManager.applyLayout( _paneManager.saveLayout() );
3377 var t =
tabs.currentTab;
3380 _paneManager.applyLayout( _paneManager.saveLayout() );
3391 var THIS =
tabs.currentTab;
3393 THIS._children = [];
3394 _paneManager.applyLayout( _paneManager.saveLayout() );
3416 var i = this._children.indexOf(p);
3418 this._html.tabs2(
"option",
"active", i );
3433 modal.prompt(
"Path for new pane:",
3439 "Create pane from path"
3456 var THIS =
tabs.currentTab;
3471 THIS.receiveTab(t,THIS._children.length);
3487 for (var i=0;i<this._children.length;i++)
3490 if (this._activated)
return;
3494 this._html.tabs2( { event:
"mousedown",
3495 active: this._selected,
3500 TABS._selected = TABS._html.tabs2(
"option",
"active");
3501 _paneManager.saveLayout();
3505 if ( TABS._children[TABS._selected] )
3506 { var p = _paneManager._currentPane = TABS._children[TABS._selected];
3508 if (p.triggerCurrentPane)
3509 p.triggerCurrentPane();
3514 this._html.find(
".ui-tabs2-panel" ).css( {top:
"",bottom:
""} );
3516 if (this._borderless)
3517 this._html.find(
"[aria-hidden=false]" ).css( {top:
"0px",bottom:
"0px"} );
3522 var parentTab = this._parent;
3525 parentTab = parentTab._parent;
3526 if (!parentTab) parentTab =
this;
3530 this._html.children(
"ul.ui-tabs2-nav").sortable(
3534 connectWith:
"#"+parentTab._tid+
" .tabs>ul.ui-tabs2-nav",
3541 placeholder:
"tabs-placeholder",
3542 forcePlaceholderSize:
true,
3543 start:
function(event,ui)
3548 $(
this).addClass(
"tabs-target-over");
3550 over:
function(event,ui)
3552 paneManager.__TABSlastOver.removeClass(
"tabs-target-over");
3554 if (!$(
this).hasClass(
"tabs-target-notallowed"))
3555 $(
this).addClass(
"tabs-target-over");
3561 if (
paneManager.__TABSparent._html.find(
".tabs #"+TABS._tid).length > 0 )
3562 $(
this).addClass(
"tabs-target-notallowed");
3564 $(
this).addClass(
"tabs-target");
3569 $(
this).removeClass(
"tabs-target tabs-target-over tabs-target-notallowed");
3572 receive:
function(event,ui)
3574 if ($(
this).hasClass(
"tabs-target-notallowed"))
3576 _paneManager.
applyLayout( _paneManager.saveLayout() );
3581 var source = ui.sender.data(
"tabsPane");
3582 var destination = $(
this).data(
"tabsPane");
3583 var
pane = ui.item.data(
"pane");
3584 var index = ui.item.index() - 1;
3586 destination.receiveTab(
pane,index);
3590 stop:
function(event,ui)
3595 var destination = $(
this).data(
"tabsPane");
3596 var
pane = ui.item.data(
"pane");
3597 var index = ui.item.index()-1;
3599 destination.moveTab(
pane,index);
3607 this._html.children(
"ul.ui-tabs2-nav").bind(
"contextmenu",
function(e)
3609 _paneManager._primaryCell =
tabs.currentTab = TABS;
3615 if (this._tabContextMenus)
3617 this._html.children(
"ul.ui-tabs2-nav").on(
"contextmenu",
"li",
function(e)
3619 var t = $(e.currentTarget);
3620 var i = t.index() - 1;
3621 tabs.currentTab = TABS._children[i];
3623 if (!
tabs.currentTab._noClose)
3646 this._html.bind(
"triggerNavigation",
function(e,dir)
3651 var i = TABS._selected;
3655 case "previous": i--;
3657 TABS._html.tabs2(
"option",
"active", i );
3659 TABS._html.parent().trigger(
"triggerNavigation",
"previous");
3664 if (i < TABS._children.length)
3665 TABS._html.tabs2(
"option",
"active", i );
3667 TABS._html.parent().trigger(
"triggerNavigation",
"next");
3670 default: console.warn(
"bad navigation direction!");
3671 console.warn(arguments);
3678 this._html.bind(
"renameTab",
function(evt,
name)
3682 var child = evt.target;
3686 for (var i=0; i<this._children.length; i++)
3688 var parent = this._children[i]._html[0];
3689 if ( $.contains( parent, child ) )
3691 tt = this._children[i];
3702 _paneManager.saveLayout();
3708 this._activated =
true;
3723 for (var t in this._trigger)
3727 case "select":
switch(this._trigger[t])
3729 case "first": this._html.tabs2(
"option",
"active", 0 );
break;
3730 case "next": console.log(
"next tab!");
break;
3731 case "previous": console.log(
"previous tab!");
break;
3741 this._html.trigger(
"triggerCurrentPane", this._trigger);
3744 var t = this._children[this._selected];
3746 if (t && t.triggerCurrentPane)
3748 t.triggerCurrentPane();
3762 for (var i=0;i<this._children.length;i++)
3767 this._activated =
false;
3782 for (var i=0;i<this._children.length;i++)
3783 { c = this._children[i];
3784 ch.push( c.saveLayout() );
3787 var l = {
name: this._name,
3796 if (this._icon) l.icon = this._icon;
3797 if (this._title) l.title = this._title;
3798 if (this._trigger) l.trigger = this._trigger;
3799 if (!this._sortable) l.sortable =
false;
3800 if (!this._showMenu) l.showMenu =
false;
3801 if (!this._tabContextMenus) l.tabContextMenus =
false;
3804 if (_paneManager._primaryCell ===
this)
3827 for(var i=0;i<this._children.length;i++)
3829 var f = this._children[i].find(p,
type);
3847 for (var i=0;i<this._children.length;i++)
3848 this._children[i].
resize();
3862 for (var i=0;i<this._children.length;i++)
3863 this._children[i].
attach();
3876 for (var i=0;i<this._children.length;i++)
3877 this._children[i].
detach();
3890 for (var i=0;i<this._children.length;i++)
3893 if (this._parent instanceof
tabs || this._parent instanceof
tabswitcher)
3894 this._parent.removeTab(
this);
3899 this._html.detach();
3901 this._parent =
null;
3902 this._children = [];
3930 var i = this._children.indexOf(oldChild);
3934 this._children[i] = newChild;
3935 newChild._parent =
this;
3968 function pane(layout,
object)
3970 if (!layout)
return;
3977 this._icon = layout.icon ||
null;
3978 this._title = layout.title ||
null;
3980 this._object =
object || _paneManager.objectFactory((layout.overrideType=layout.type,layout),(
this._path?
null:
this.applySubscription.bind(
this,{},{})));
3984 this._parent =
null;
3985 this._activated =
false;
3986 this._trigger = layout.trigger;
3987 this._keepType = layout.keepType ||
false;
3988 this._noClose = layout.noClose ||
false;
3989 this._layout = layout;
3990 this._context = layout.context || {};
3991 this._context.sourcefile = this._context.sourcefile ||
utils.
fileNameFromPath( this._path,
true,
true );
3992 this._context.sourcepath = this._context.sourcepath || this._path;
3993 this._class = layout.class ||
null;
3995 _paneManager.registerPane(
this );
4011 if (this._html)
return this._html;
4013 var n = $(
"<div tabindex='-1' class='pane' id='"+this._tid+
"'/>");
4014 n.attr(
"vfspath",this._path);
4017 n.addClass( this._class );
4019 if (this._object && this._object.createHTML)
4020 n.append(this._object.createHTML());
4023 var
mask = this._mask = $(
"<div class='paneMask'>").appendTo(n);
4031 "background-image":
"url('"+paneLoaderImg+
"')",
4032 "background-position":
"center center",
4033 "background-repeat":
"no-repeat",
4034 "background-size":
"auto auto",
4037 cursor:
"not-allowed",
4039 mask.attr(
"title",
"Resource temporarily unavailable.");
4059 this._parent.renameTab(
this,
name);
4079 _paneManager.applyLayout( _paneManager.saveLayout() );
4097 this._object.applyDiff(data,
user);
4123 _paneManager.applyLayout( _paneManager.saveLayout() );
4131 if (this._layout.type &&
this._layout.type !==
"pane")
4132 type = this._layout.type;
4151 var layout = this._layout;
4152 layout.parent =
this;
4162 var oldObject = this._object;
4164 this._object = _paneManager.objectFactory(layout,cb);
4175 this._html.children(
":not(.paneMask)").remove();
4186 if (
"createHTML" in this._object)
4189 oh = this._object.createHTML();
4192 this._html.append( oh );
4194 if (
"resize" in this._object)
4195 this._object.resize();
4199 oh.bind(
"createpane",
function(evt,newpane) {
4200 var p = _paneManager.fetchPane( newpane );
4201 THIS._parent.selectTabHandler( THIS._parent.appendTab( p ) );
4210 { console.warn(
"can't createHTML for object...");
4211 console.warn(this._object);
4214 if (this._activated && this._object.activate)
4215 this._object.activate();
4217 this._object.applySubscription(data,
metadata);
4220 if (oldObject && oldObject instanceof
paneLoader)
4222 var diffList = oldObject._diffList;
4225 while(diffList.length)
4227 var diff = diffList.shift();
4229 this._object.applyDiff(diff,
"loader");
4234 oh.trigger(
"paneloaded",[
this]);
4243 this._object.applySubscription(data,
metadata);
4268 if (this._object && this._object.applySettings)
4269 this._object.applySettings(settings);
4283 if (this._object && this._object.applyRequestLock)
4284 this._object.applyRequestLock(data);
4298 if (this._object && this._object.applyReleaseLock)
4299 this._object.applyReleaseLock(data);
4316 if (
id === this._path)
4318 if (this._object && this._object.applyRequestSuccess)
4319 this._object.applyRequestSuccess(command,
id,data,
metadata);
4321 console.log(
"no applyRequestSuccess on the object",this._object);
4326 case "rm": console.warn(
"close pane now...");
4328 _paneManager.applyLayout( _paneManager.saveLayout() );
4331 default: console.log(
"success: "+this._path+
" "+command);
4336 console.trace(
"applyRequestSuccess for different id: "+
id,arguments);
4356 modal.alert(
"Unable to subscribe to '"+fn+
"'.\n\nThe pane or tab was removed." );
4363 console.error(command,
id,reason);
4368 if (this._object && this._object.applyRequestError)
4369 this._object.applyRequestError(command,
id,reason);
4371 modal.alert( reason,
null, command+
" error" );
4385 if (this._html)
return (this._html[0].parentElement!==
null);
4398 if (this._object && this._object.attach)
4399 this._object.attach();
4412 this._parent =
null;
4414 if (this._object && this._object.detach)
4415 this._object.detach();
4417 if (this._html) this._html.detach();
4432 if (_paneManager._currentPane ===
this)
4433 { requestAnimationFrame(
function() {
4438 if (this._activated)
return;
4462 if (this._object && this._object.activate)
4463 this._object.activate();
4465 this._activated =
true;
4489 this._html.trigger(
"triggerCurrentPane",
this._trigger);
4492 if (this._object && this._object.triggerCurrentPane)
4493 this._object.triggerCurrentPane();
4508 if (this._object && this._object.deactivate)
4509 this._object.deactivate();
4511 this._activated =
false;
4531 l.keepType = this._keepType;
4533 if (this._layout.icon)
4534 l.icon = this._layout.icon;
4537 l.trigger = this._trigger;
4540 l.noClose = this._noClose;
4543 l[
"class"] = this._class;
4546 l[
"title"] = this._title;
4549 { var s = this._object._saveFields;
4551 l[f] = this._object[s[f]];
4560 var no = [
"id",
"type",
"parent",
"metadata"];
4562 for (var
y in this._layout)
4563 if (!no.includes(
y) && !(
y in l))
4586 if ( ( (!
type) || (
utils.
isInstanceOf(
this,
type)) ) && ( (!p) || (p===
this) || (p===this._name) || (p===this._id) || (p===this._path) ) )
4602 if (this._object && this._object.resize)
4603 this._object.resize();
4638 a = this._html.width() * this._html.height();
4655 if (this._parent instanceof
tabs || this._parent instanceof
tabswitcher)
4656 this._parent.removeTab(
this);
4657 else if (this._parent instanceof
splitter)
4658 this._parent.mergeOut(
this);
4662 _paneManager.unregisterPane(
this);
4665 this._html.detach();
4668 this._parent =
null;
4673 if (this._object.destroy)
4675 _paneManager.objectDestroy(this._object);
4676 this._object.destroy();
4679 console.log(
"missing destroy!",this._object);
4681 this._object =
null;
4696 if (this._object && this._object._help)
4716 if (this._object && this._object._help)
4717 return this._object._help;
4719 return "No help available for this item.";
4733 return this._keepType ? this._object.paneType :
"pane";
4750 _paneManager.classes = {
4757 return _paneManager;
applySubscription(data, metadata)
setter selected
a setter DOCME
setter moving
a setter DOCME
getter html
Get the html color representation of this object.
getter id
returns the number of milliseconds since midnight January 1, 1970 UTC
setter background
Set the background color of the renderer.
getter position
A getter, returns this._position.
This library creates convenient methods for adding keyboard shortcuts to an application.
registerCommand(c, f, l, r, p)
Register a command with a keyboard listener.
setter name
a setter DOCME
setter type
a setter DOCME
find(id, type)
Find a registered object, optionally by type.
applyRequestError(command, id, reason)
printRegistry()
Print the contents of the registry to the console.
applyReleaseLock(id, data)
registerObject(id, o, nosubscribe)
Register an object in the registry, and call the pathAddedCallback.
applyRequestLock(id, data)
unregisterObject(id, o, silent, nounsubscribe, now)
Unregister an object from the registry.
Create a pane which will be mounted into a paneManager layout.
mounted(mountState)
Notify this pane that the mounted state has changed.
getter help
A getter that will return a pane object's help message, or a default message indicating that no help ...
attached()
Detects is this pane is attached to the DOM.
getter paneType
A getter which will calculate the pane type based on the _object, or return the default "pane".
A tabbed layout element which allows splits.
createPaneByPath()
Create a new pane to any path.
tabs(layout)
Create a tabs object based on layout parameters.
A tabbed layout element, intended to be used at the top of the applications UI.
replaceChild(oldChild, newChild)
attach()
Attach the tabs's children.
deactivate()
Deactivate this element and call deactivate on all its children.
tabswitcher(layout)
Create a tabswitcher object based on layout parameters.
detach()
Detach the tab's children.
triggerCurrentPane()
DOCME.
closeAllTabs()
Close all open tabs.
The paneManager manages panes in a user layout.
toggleSinglePane(e, nosave)
openApplicationLayout(event, context, template, metadata)
registerPane(p)
Register a pane in the paneManager registry, and also add it to the objectRegistry.
applyLayout(_layout)
Apply a json layout, building and destroying children as needed.
pathDeleteCallback()
A callback to use for deleting entries in the VFS based on a path.
pathSubmitCallback()
DOCME.
pathAddedCallback()
DOCME.
setter config
a setter DOCME
openModalForm(path, form, title, size, context, metadata)
toggleSinglePaneBorderless(e, nosave)
pathRemovedCallback()
DOCME.
garbageCollect()
garbge collect (destroy) any unmounted cells
fetchPane(c, o)
Find a pane by path/id, and return it, or create a new pane.
findPane(c)
Find a pane by path/id, and return it, or return null.
pathCreateCallback()
A callback to use for creating new entries in the VFS based on a path.
getter valid
a getter DOCME
getter mask
a getter DOCME
getter path
a getter DOCME
applyRequestSuccess()
If an adminstrator has deleted his own preferences, this function will be called on success.
setter total
a setter DOCME
createHTML()
Create the HTML contents of the pane.
Utility functions for javascript clients.
uuid()
Generate a universally unique identifier.
toggleFullScreen()
Toggle the fullscreen state of the page.
cleanPath(path)
Clean and normalize a resource path.
fileNameFromPath(p, orDirIfNeeded)
Retrieve the last part of a file path.
copyObject(source, dest)
Create a deep copy of a JSON object, extending the destination object recursively.
isInstanceOf(o, t)
Check if an object is of a chosen type.
resolveContextValues(o, ctx)
Recursively resolve any context values in an object.
createPaneByPathHandler()