Browse Source

Work on rating and tab updates. Tab documentation

Former-commit-id: 4ee9aec071
Former-commit-id: c4150544f8
pull/258/head
jlukic 11 years ago
parent
commit
90b9f818c9
22 changed files with 741 additions and 332 deletions
  1. 15
      RELEASE NOTES.md
  2. 3
      build/less/collections/grid.less
  3. 80
      build/less/modules/rating.js
  4. 31
      build/less/modules/tab.js
  5. 80
      build/minified/modules/rating.js
  6. 31
      build/minified/modules/tab.js
  7. 3
      build/uncompressed/collections/grid.css
  8. 80
      build/uncompressed/modules/rating.js
  9. 31
      build/uncompressed/modules/tab.js
  10. 41
      node/src/documents/modules/rating.html.eco
  11. 203
      node/src/documents/modules/tab.html.eco
  12. 3
      node/src/files/build/less/collections/grid.less
  13. 80
      node/src/files/build/less/modules/rating.js
  14. 31
      node/src/files/build/less/modules/tab.js
  15. 80
      node/src/files/build/minified/modules/rating.js
  16. 31
      node/src/files/build/minified/modules/tab.js
  17. 3
      node/src/files/build/uncompressed/collections/grid.css
  18. 80
      node/src/files/build/uncompressed/modules/rating.js
  19. 31
      node/src/files/build/uncompressed/modules/tab.js
  20. 25
      node/src/files/javascript/tab.js
  21. 80
      src/modules/rating.js
  22. 31
      src/modules/tab.js

15
RELEASE NOTES.md

@ -1,13 +1,24 @@
## RELEASE NOTES
### Version 0.2.5- Sep 30, 2013
### Version 0.3.0 - Sep 30, 2013
**Additions**
- Adds new UI module tab with documentation.
**Updates**
- Adds new methods to rating, 'get rating', 'clear rating', adds new setting 'clearable'
- Adds rating as first callback parameter on 'onRate'
**Fixes**
### Version 0.2.5 - Sep 30, 2013
**Fixes**
- Fixes checkbox selector issue with multiple inputs inside a checkbox
- Modal no longer uses inline css to center when in fixed position mode
- Fixes dropdown to now set active item to whatever hidden input field is when using action updateForm
### Version 0.2.4- Sep 28, 2013
### Version 0.2.4 - Sep 28, 2013
**Updates**

3
build/less/collections/grid.less

@ -98,7 +98,8 @@
.ui.page.grid {
margin: 0%;
padding: 0% 2%;
padding-left: 0%;
padding-right: 0%;
}

80
build/less/modules/rating.js

@ -87,29 +87,6 @@ $.fn.rating = function(parameters) {
;
},
setRating: function(rating) {
var
$activeIcon = $icon.eq(rating - 1)
;
module.verbose('Setting current rating to', rating);
$module
.removeClass(className.hover)
;
$icon
.removeClass(className.hover)
;
$activeIcon
.nextAll()
.removeClass(className.active)
;
$activeIcon
.addClass(className.active)
.prevAll()
.addClass(className.active)
;
$.proxy(settings.onRate, element)();
},
event: {
mouseenter: function() {
var
@ -138,11 +115,57 @@ $.fn.rating = function(parameters) {
},
click: function() {
var
$activeIcon = $(this)
$activeIcon = $(this),
currentRating = module.getRating(),
rating = $icon.index($activeIcon) + 1
;
if(settings.clearable && currentRating == rating) {
module.clearRating();
}
else {
module.setRating( rating );
}
}
},
clearRating: function() {
module.debug('Clearing current rating');
module.setRating(0);
},
getRating: function() {
var
currentRating = $icon.filter('.' + className.active).size()
;
module.verbose('Current rating retrieved', currentRating);
return currentRating;
},
setRating: function(rating) {
var
ratingIndex = (rating - 1 >= 0)
? (rating - 1)
: 0,
$activeIcon = $icon.eq(ratingIndex)
;
$module
.removeClass(className.hover)
;
$icon
.removeClass(className.hover)
.removeClass(className.active)
;
if(rating > 0) {
module.verbose('Setting current rating to', rating);
$activeIcon
.addClass(className.active)
.prevAll()
.addClass(className.active)
;
module.setRating( $icon.index($activeIcon) + 1);
}
$.proxy(settings.onRate, element)(rating);
},
setting: function(name, value) {
if(value !== undefined) {
if( $.isPlainObject(name) ) {
@ -231,9 +254,6 @@ $.fn.rating = function(parameters) {
if(moduleSelector) {
title += ' \'' + moduleSelector + '\'';
}
if($allModules.size() > 1) {
title += ' ' + '(' + $allModules.size() + ')';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
@ -336,7 +356,9 @@ $.fn.rating.settings = {
initialRating : 0,
interactive : true,
onRate : function(){},
clearable : false,
onRate : function(rating){},
error : {
method : 'The method you called is not defined'

31
build/less/modules/tab.js

@ -54,6 +54,15 @@
initialize: function() {
module.debug('Initializing Tabs', $module);
// set up automatic routing
if(settings.auto) {
module.verbose('Setting up automatic tab retrieval from server');
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
// attach history events
if(settings.history) {
if( $.address === undefined ) {
@ -65,11 +74,6 @@
return false;
}
else {
if(settings.auto) {
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
module.verbose('Address library found adding state change event');
$.address
.state(settings.path)
@ -78,9 +82,10 @@
;
}
}
// attach events if navigation wasn't set to window
if( !$.isWindow( element ) ) {
module.debug('Attaching events to tab activator', $module);
module.debug('Attaching tab activation events to element', $module);
$module
.on('click' + eventNamespace, module.event.click)
;
@ -103,7 +108,7 @@
},
event: {
click: function() {
click: function(event) {
module.debug('Navigation clicked');
var
tabPath = $(this).data(metadata.tab)
@ -115,6 +120,7 @@
else {
module.changeTab(tabPath);
}
event.preventDefault();
}
else {
module.debug('No tab specified');
@ -262,6 +268,7 @@
},
request = $tab.data(metadata.promise) || false,
existingRequest = ( request && request.state() === 'pending' ),
requestSettings,
cachedContent
;
@ -281,8 +288,10 @@
;
}
else if($.api !== undefined) {
module.debug('Retrieving remote content', fullTabPath);
$.api( $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings) );
console.log(settings.apiSettings);
requestSettings = $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings);
module.debug('Retrieving remote content', fullTabPath, requestSettings);
$.api( requestSettings );
}
else {
module.error(error.api);
@ -372,7 +381,7 @@
module.error(error.recursion);
}
else {
module.debug('No default tabs found for', tabPath);
module.debug('No default tabs found for', tabPath, $tabs);
}
recursionDepth = 0;
return tabPath;
@ -642,7 +651,7 @@
// max depth a tab can be nested
maxDepth : 25,
// dont load content on first load
ignoreFirstLoad : true,
ignoreFirstLoad : false,
// load tab content new every tab click
alwaysRefresh : false,
// cache the content requests to pull locally

80
build/minified/modules/rating.js

@ -87,29 +87,6 @@ $.fn.rating = function(parameters) {
;
},
setRating: function(rating) {
var
$activeIcon = $icon.eq(rating - 1)
;
module.verbose('Setting current rating to', rating);
$module
.removeClass(className.hover)
;
$icon
.removeClass(className.hover)
;
$activeIcon
.nextAll()
.removeClass(className.active)
;
$activeIcon
.addClass(className.active)
.prevAll()
.addClass(className.active)
;
$.proxy(settings.onRate, element)();
},
event: {
mouseenter: function() {
var
@ -138,11 +115,57 @@ $.fn.rating = function(parameters) {
},
click: function() {
var
$activeIcon = $(this)
$activeIcon = $(this),
currentRating = module.getRating(),
rating = $icon.index($activeIcon) + 1
;
if(settings.clearable && currentRating == rating) {
module.clearRating();
}
else {
module.setRating( rating );
}
}
},
clearRating: function() {
module.debug('Clearing current rating');
module.setRating(0);
},
getRating: function() {
var
currentRating = $icon.filter('.' + className.active).size()
;
module.verbose('Current rating retrieved', currentRating);
return currentRating;
},
setRating: function(rating) {
var
ratingIndex = (rating - 1 >= 0)
? (rating - 1)
: 0,
$activeIcon = $icon.eq(ratingIndex)
;
$module
.removeClass(className.hover)
;
$icon
.removeClass(className.hover)
.removeClass(className.active)
;
if(rating > 0) {
module.verbose('Setting current rating to', rating);
$activeIcon
.addClass(className.active)
.prevAll()
.addClass(className.active)
;
module.setRating( $icon.index($activeIcon) + 1);
}
$.proxy(settings.onRate, element)(rating);
},
setting: function(name, value) {
if(value !== undefined) {
if( $.isPlainObject(name) ) {
@ -231,9 +254,6 @@ $.fn.rating = function(parameters) {
if(moduleSelector) {
title += ' \'' + moduleSelector + '\'';
}
if($allModules.size() > 1) {
title += ' ' + '(' + $allModules.size() + ')';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
@ -336,7 +356,9 @@ $.fn.rating.settings = {
initialRating : 0,
interactive : true,
onRate : function(){},
clearable : false,
onRate : function(rating){},
error : {
method : 'The method you called is not defined'

31
build/minified/modules/tab.js

@ -54,6 +54,15 @@
initialize: function() {
module.debug('Initializing Tabs', $module);
// set up automatic routing
if(settings.auto) {
module.verbose('Setting up automatic tab retrieval from server');
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
// attach history events
if(settings.history) {
if( $.address === undefined ) {
@ -65,11 +74,6 @@
return false;
}
else {
if(settings.auto) {
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
module.verbose('Address library found adding state change event');
$.address
.state(settings.path)
@ -78,9 +82,10 @@
;
}
}
// attach events if navigation wasn't set to window
if( !$.isWindow( element ) ) {
module.debug('Attaching events to tab activator', $module);
module.debug('Attaching tab activation events to element', $module);
$module
.on('click' + eventNamespace, module.event.click)
;
@ -103,7 +108,7 @@
},
event: {
click: function() {
click: function(event) {
module.debug('Navigation clicked');
var
tabPath = $(this).data(metadata.tab)
@ -115,6 +120,7 @@
else {
module.changeTab(tabPath);
}
event.preventDefault();
}
else {
module.debug('No tab specified');
@ -262,6 +268,7 @@
},
request = $tab.data(metadata.promise) || false,
existingRequest = ( request && request.state() === 'pending' ),
requestSettings,
cachedContent
;
@ -281,8 +288,10 @@
;
}
else if($.api !== undefined) {
module.debug('Retrieving remote content', fullTabPath);
$.api( $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings) );
console.log(settings.apiSettings);
requestSettings = $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings);
module.debug('Retrieving remote content', fullTabPath, requestSettings);
$.api( requestSettings );
}
else {
module.error(error.api);
@ -372,7 +381,7 @@
module.error(error.recursion);
}
else {
module.debug('No default tabs found for', tabPath);
module.debug('No default tabs found for', tabPath, $tabs);
}
recursionDepth = 0;
return tabPath;
@ -642,7 +651,7 @@
// max depth a tab can be nested
maxDepth : 25,
// dont load content on first load
ignoreFirstLoad : true,
ignoreFirstLoad : false,
// load tab content new every tab click
alwaysRefresh : false,
// cache the content requests to pull locally

3
build/uncompressed/collections/grid.css

@ -78,7 +78,8 @@
--------------------*/
.ui.page.grid {
margin: 0%;
padding: 0% 2%;
padding-left: 0%;
padding-right: 0%;
}
/*-------------------
Responsive

80
build/uncompressed/modules/rating.js

@ -87,29 +87,6 @@ $.fn.rating = function(parameters) {
;
},
setRating: function(rating) {
var
$activeIcon = $icon.eq(rating - 1)
;
module.verbose('Setting current rating to', rating);
$module
.removeClass(className.hover)
;
$icon
.removeClass(className.hover)
;
$activeIcon
.nextAll()
.removeClass(className.active)
;
$activeIcon
.addClass(className.active)
.prevAll()
.addClass(className.active)
;
$.proxy(settings.onRate, element)();
},
event: {
mouseenter: function() {
var
@ -138,11 +115,57 @@ $.fn.rating = function(parameters) {
},
click: function() {
var
$activeIcon = $(this)
$activeIcon = $(this),
currentRating = module.getRating(),
rating = $icon.index($activeIcon) + 1
;
if(settings.clearable && currentRating == rating) {
module.clearRating();
}
else {
module.setRating( rating );
}
}
},
clearRating: function() {
module.debug('Clearing current rating');
module.setRating(0);
},
getRating: function() {
var
currentRating = $icon.filter('.' + className.active).size()
;
module.verbose('Current rating retrieved', currentRating);
return currentRating;
},
setRating: function(rating) {
var
ratingIndex = (rating - 1 >= 0)
? (rating - 1)
: 0,
$activeIcon = $icon.eq(ratingIndex)
;
$module
.removeClass(className.hover)
;
$icon
.removeClass(className.hover)
.removeClass(className.active)
;
if(rating > 0) {
module.verbose('Setting current rating to', rating);
$activeIcon
.addClass(className.active)
.prevAll()
.addClass(className.active)
;
module.setRating( $icon.index($activeIcon) + 1);
}
$.proxy(settings.onRate, element)(rating);
},
setting: function(name, value) {
if(value !== undefined) {
if( $.isPlainObject(name) ) {
@ -231,9 +254,6 @@ $.fn.rating = function(parameters) {
if(moduleSelector) {
title += ' \'' + moduleSelector + '\'';
}
if($allModules.size() > 1) {
title += ' ' + '(' + $allModules.size() + ')';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
@ -336,7 +356,9 @@ $.fn.rating.settings = {
initialRating : 0,
interactive : true,
onRate : function(){},
clearable : false,
onRate : function(rating){},
error : {
method : 'The method you called is not defined'

31
build/uncompressed/modules/tab.js

@ -54,6 +54,15 @@
initialize: function() {
module.debug('Initializing Tabs', $module);
// set up automatic routing
if(settings.auto) {
module.verbose('Setting up automatic tab retrieval from server');
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
// attach history events
if(settings.history) {
if( $.address === undefined ) {
@ -65,11 +74,6 @@
return false;
}
else {
if(settings.auto) {
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
module.verbose('Address library found adding state change event');
$.address
.state(settings.path)
@ -78,9 +82,10 @@
;
}
}
// attach events if navigation wasn't set to window
if( !$.isWindow( element ) ) {
module.debug('Attaching events to tab activator', $module);
module.debug('Attaching tab activation events to element', $module);
$module
.on('click' + eventNamespace, module.event.click)
;
@ -103,7 +108,7 @@
},
event: {
click: function() {
click: function(event) {
module.debug('Navigation clicked');
var
tabPath = $(this).data(metadata.tab)
@ -115,6 +120,7 @@
else {
module.changeTab(tabPath);
}
event.preventDefault();
}
else {
module.debug('No tab specified');
@ -262,6 +268,7 @@
},
request = $tab.data(metadata.promise) || false,
existingRequest = ( request && request.state() === 'pending' ),
requestSettings,
cachedContent
;
@ -281,8 +288,10 @@
;
}
else if($.api !== undefined) {
module.debug('Retrieving remote content', fullTabPath);
$.api( $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings) );
console.log(settings.apiSettings);
requestSettings = $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings);
module.debug('Retrieving remote content', fullTabPath, requestSettings);
$.api( requestSettings );
}
else {
module.error(error.api);
@ -372,7 +381,7 @@
module.error(error.recursion);
}
else {
module.debug('No default tabs found for', tabPath);
module.debug('No default tabs found for', tabPath, $tabs);
}
recursionDepth = 0;
return tabPath;
@ -642,7 +651,7 @@
// max depth a tab can be nested
maxDepth : 25,
// dont load content on first load
ignoreFirstLoad : true,
ignoreFirstLoad : false,
// load tab content new every tab click
alwaysRefresh : false,
// cache the content requests to pull locally

41
node/src/documents/modules/rating.html.eco

@ -122,6 +122,22 @@ type : 'UI Module'
</div>
</div>
<div class="example">
<h4 class="ui header">Clearing Ratings</h4>
<p>When clearable is set to <code>true</code> you can clear the rating by clicking on the current start rating.</p>
<div class="code" data-type="javascript" data-demo="true">
$('.demo.rating')
.rating('setting', 'clearable', true)
;
</div>
<div class="ui heart demo rating" data-rating="3">
<i class="icon"></i>
<i class="icon"></i>
<i class="icon"></i>
<i class="icon"></i>
<i class="icon"></i>
</div>
</div>
<h2 class="ui dividing header">Variations</h2>
@ -166,6 +182,26 @@ type : 'UI Module'
</div>
</div>
<div class="no example">
<h4 class="ui header">Get Rating</h4>
<p>A rating can be retrieved</p>
<div class="ignore code">
$('.ui.rating')
.rating('set rating', 3)
;
</div>
</div>
<div class="no example">
<h4 class="ui header">Clear Rating</h4>
<p>A rating can be cleared</p>
<div class="ignore code">
$('.ui.rating')
.rating('clear rating')
;
</div>
</div>
<h2 class="ui dividing header">Settings</h2>
<div class="no example">
@ -184,6 +220,11 @@ type : 'UI Module'
<td>0</td>
<td>A number representing the default rating to apply</td>
</tr>
<tr>
<td>clearable</td>
<td>false</td>
<td>If enabled clicking on the current star rating will clear the rating</td>
</tr>
<tr>
<td>interactive</td>
<td>true</td>

203
node/src/documents/modules/tab.html.eco

@ -15,82 +15,203 @@ type : 'UI Module'
<div class="peek">
<div class="ui vertical pointing secondary menu">
<a class="item">Usage</a>
<a class="item">Examples</a>
<a class="item">Coupling</a>
<a class="item">Behavior</a>
<a class="item">Settings</a>
</div>
</div>
<h2 class="ui dividing header">Usage</h2>
<h2 class="ui dividing header">Examples</h2>
<h4 class="ui header">Opening tabs with menus</h4>
<p>Tabs are usually used in concert with an element that activates the tab.</p>
<p>When using tabs, unlike other UI components, the menu or activating element is initialized instead of the tab.</p>
<div class="first no example">
<div class="ignored ui info message">
Tabs are connected to their activators with a metadata attribute <code>data-tab</code>. This should be added to both the activating element and the tab itself.
</div>
<div class="code" data-type="javascript" data-demo="true">
$('.demo.menu .item')
.tab()
<h4 class="ui header">Opening tabs with menus</h4>
<p>Tabs are usually used in concert with an element that activates the tab. When using tabs, unlike other UI components, the menu or activating element is initialized instead of the tab.</p>
<p>Tabs are connected to their activators with a metadata attribute <code>data-tab</code>. This should be added to both the activating element and the tab itself.</p>
<div class="ignored ui info message">
<h4 class="ui header">Default tabs</h4>
<p>After any tab is opened it will look for a default tab to open inside of the current tab. This is the first tab that begins with the same stem url as the parent tab. For example a tab with the path <code>data-tab="home"</code> might open a tab automatically <code>data-tab="/home/inbox"</code>.</p>
<p>This will happen recursively for every tab open, allowing as many levels of tabs as you like</p>
</div>
<div class="code" data-type="javascript">
$('.first.example .menu .item')
.tab({
context: '.first.example'
})
;
</div>
<div class="code" data-type="html" data-label="true" data-preview="true">
<div class="ui pointing secondary demo menu">
<a class="active item" data-tab="1">First</a>
<a class="item" data-tab="2">Second</a>
<a class="item" data-tab="3">Third</a>
</div>
<div class="code" data-type="html" data-label="true">
<div class="ui pointing secondary menu">
<a class="active item" data-tab="first">First</a>
<a class="item" data-tab="second">Second</a>
<a class="item" data-tab="third">Third</a>
</div>
<div class="ui active tab segment" data-tab="first">
First Tab
<div class="ui top attached tabular menu">
<a class="active item" data-tab="first/a">1A</a>
<a class="item" data-tab="first/b">1B</a>
<a class="item" data-tab="first/c">1C</a>
</div>
<div class="ui bottom attached active tab segment" data-tab="first/a">1A</div>
<div class="ui bottom attached tab segment" data-tab="first/b">1B</div>
<div class="ui bottom attached tab segment" data-tab="first/c">1C</div>
</div>
<div class="ui tab segment" data-tab="second">...</div>
<div class="ui tab segment" data-tab="third">...</div>
</div>
<div class="ui pointing secondary menu">
<a class="active item" data-tab="first">First</a>
<a class="item" data-tab="second">Second</a>
<a class="item" data-tab="third">Third</a>
</div>
<div class="ui active tab segment" data-tab="first">
<div class="ui top attached tabular menu">
<a class="active item" data-tab="first/a">1A</a>
<a class="item" data-tab="first/b">1B</a>
<a class="item" data-tab="first/c">1C</a>
</div>
<div class="ui bottom attached active tab segment" data-tab="first/a">1A</div>
<div class="ui bottom attached tab segment" data-tab="first/b">1B</div>
<div class="ui bottom attached tab segment" data-tab="first/c">1C</div>
</div>
<div class="ui tab segment" data-tab="second">
Second Tab
<div class="ui top attached tabular menu">
<a class="item" data-tab="second/a">2A</a>
<a class="item" data-tab="second/b">2B</a>
<a class="item" data-tab="second/c">2C</a>
</div>
<div class="ui bottom attached tab segment" data-tab="second/a">2A</div>
<div class="ui bottom attached tab segment" data-tab="second/b">2B</div>
<div class="ui bottom attached tab segment" data-tab="second/c">2C</div>
</div>
<div class="ui tab segment" data-tab="third">
Third Tab
<div class="ui top attached tabular menu">
<a class="item" data-tab="third/a">3A</a>
<a class="item" data-tab="third/b">3B</a>
<a class="item" data-tab="third/c">3C</a>
</div>
<div class="ui bottom attached tab segment" data-tab="third/a">3A</div>
<div class="ui bottom attached tab segment" data-tab="third/b">3B</div>
<div class="ui bottom attached tab segment" data-tab="third/c">3C</div>
</div>
</div>
<h4 class="ui header">Managing Back/Forward Buttons with Tabs</h4>
<p>Tabs can attach to a history change event to allow for tabs to maintain history events. Tabs use Asual's <a href="https://github.com/asual/jquery-address">Address library</a> to provide cross-browser push state support. This makes sure in browser that don't support push state, <code>hashchange</code> is used with in page anchors to provide history functionality.</p>
<div class="ignored ui warning message">
<div class="header">Use proper path</div>
Make sure when you use history to specify the proper path. This is required for determining the stem url from the part of the url maintaining in page history. Using the incorrect path will cause the module to work incorrectly, producing unexpected results.
</div>
<div class="ignored ui warning message">
<div class="header">Route your URLs</div>
Be sure to set up routes on your server for any url used with history. If you use history to change the url to a location that does not exist, it will 404 on the next refresh. For example this documentation will 404 on refresh because Github Pages are only set up to server static site content.
<h2 class="ui dividing header">Optional Coupling</h2>
<div class="history no example">
<h4 class="ui header">Managing History with Tabs</h4>
<p>Tabs can attach to a history change event to allow for tabs to maintain history events. Tabs use Asual's <a href="https://github.com/asual/jquery-address">Address library</a> to provide cross-browser push state support. This makes sure in browser that don't support push state, <code>hashchange</code> is used with in page anchors to provide history functionality.</p>
<div class="ignored ui warning message">
<h4 class="header">Setup Paths</h4>
Make sure when you use history to specify the path. This is required for determining the stem url from the part of the url maintaining in page history. The path is the URL without any tabs open. This cannot usually be set automatically because on future page refreshes the URL may include an internal link. Using the incorrect path will cause the module to work incorrectly, producing unexpected results.
</div>
<div class="ignored ui red message">
<h4 class="header">Route your URLs</h4>
Be sure to set up routes on your server for any url used with history. If you use history to change the url to a location that does not exist, it will 404 on the next refresh. The docs for example, are static github hosted pages, so will 404 if the page url changes
</div>
<div class="code" data-type="javascript">
$('.history.example .menu .item')
.tab({
context : '.history.example',
history : true,
path : '/modules/tab.html'
})
;
</div>
<div class="ui pointing secondary menu">
<a class="active item" data-tab="first">First</a>
<a class="item" data-tab="second">Second</a>
<a class="item" data-tab="third">Third</a>
</div>
<div class="ui active tab segment" data-tab="first">
<div class="ui top attached tabular menu">
<a class="active item" data-tab="first/a">1A</a>
<a class="item" data-tab="first/b">1B</a>
<a class="item" data-tab="first/c">1C</a>
</div>
<div class="ui bottom attached active tab segment" data-tab="first/a">1A</div>
<div class="ui bottom attached tab segment" data-tab="first/b">1B</div>
<div class="ui bottom attached tab segment" data-tab="first/c">1C</div>
</div>
<div class="ui tab segment" data-tab="second">
<div class="ui top attached tabular menu">
<a class="item" data-tab="second/a">2A</a>
<a class="item" data-tab="second/b">2B</a>
<a class="item" data-tab="second/c">2C</a>
</div>
<div class="ui bottom attached tab segment" data-tab="second/a">2A</div>
<div class="ui bottom attached tab segment" data-tab="second/b">2B</div>
<div class="ui bottom attached tab segment" data-tab="second/c">2C</div>
</div>
<div class="ui tab segment" data-tab="third">
<div class="ui top attached tabular menu">
<a class="item" data-tab="third/a">3A</a>
<a class="item" data-tab="third/b">3B</a>
<a class="item" data-tab="third/c">3C</a>
</div>
<div class="ui bottom attached tab segment" data-tab="third/a">3A</div>
<div class="ui bottom attached tab segment" data-tab="third/b">3B</div>
<div class="ui bottom attached tab segment" data-tab="third/c">3C</div>
</div>
</div>
<div class="code" data-type="javascript" data-demo="true">
$('.history.menu .item')
<div class="dynamic no example">
<h4 class="header">Retreiving Dynamic Tab Content</h4>
<p>The easiest way to setup dynamic content is to use the parameter <code>auto</code>, this will automatically retrieve content at a remote url matching the url set in the browser. The URL will receive an addition HTTP Header <code>'X-Remote': true</code>. You can use this on your server's back-end to determine whether a request is an AJAX request from a tab</p>
<p>This uses a similar technique to <a href="https://github.com/defunkt/jquery-pjax">pJax</a> or Rail's <a href="https://github.com/rails/turbolinks/">turbolinks</a>.</p>
<div class="ignored ui info message">There are a variety of settings for configuring dynamic content behavior. Visit the tab settings section for more information</div>
<div class="code" data-type="javascript">
$('.dynamic.example .menu .item')
.tab({
history : true,
context : '.dynamic.example',
auto : true,
path : '/modules/tab.html'
})
;
</div>
<div class="code" data-type="html" data-label="true" data-preview="true">
<div class="ui pointing secondary history menu">
</div>
<div class="ui pointing secondary menu">
<a class="active item" data-tab="first">First</a>
<a class="item" data-tab="second">Second</a>
<a class="item" data-tab="third">Third</a>
</div>
<div class="ui active tab segment" data-tab="first">
First Tab
<div class="ui top attached tabular menu">
<a class="active item" data-tab="first/a">1A</a>
<a class="item" data-tab="first/b">1B</a>
<a class="item" data-tab="first/c">1C</a>
</div>
<div class="ui bottom attached active tab segment" data-tab="first/a"></div>
<div class="ui bottom attached tab segment" data-tab="first/b"></div>
<div class="ui bottom attached tab segment" data-tab="first/c"></div>
</div>
<div class="ui tab segment" data-tab="second">
Second Tab
<div class="ui top attached tabular menu">
<a class="item" data-tab="second/a">2A</a>
<a class="item" data-tab="second/b">2B</a>
<a class="item" data-tab="second/c">2C</a>
</div>
<div class="ui bottom attached tab segment" data-tab="second/a"></div>
<div class="ui bottom attached tab segment" data-tab="second/b"></div>
<div class="ui bottom attached tab segment" data-tab="second/c"></div>
</div>
<div class="ui tab segment" data-tab="third">
Third Tab
<div class="ui top attached tabular menu">
<a class="item" data-tab="third/a">3A</a>
<a class="item" data-tab="third/b">3B</a>
<a class="item" data-tab="third/c">3C</a>
</div>
<div class="ui bottom attached tab segment" data-tab="third/a"></div>
<div class="ui bottom attached tab segment" data-tab="third/b"></div>
<div class="ui bottom attached tab segment" data-tab="third/c"></div>
</div>
</div>
<h2 class="ui dividing header">Examples</h2>
<h2 class="ui dividing header">Behavior</h2>
All the following behaviors can be called using the syntax <code>$('.foo').tab('behavior name', argumentOne, argumentTwo)</code>

3
node/src/files/build/less/collections/grid.less

@ -98,7 +98,8 @@
.ui.page.grid {
margin: 0%;
padding: 0% 2%;
padding-left: 0%;
padding-right: 0%;
}

80
node/src/files/build/less/modules/rating.js

@ -87,29 +87,6 @@ $.fn.rating = function(parameters) {
;
},
setRating: function(rating) {
var
$activeIcon = $icon.eq(rating - 1)
;
module.verbose('Setting current rating to', rating);
$module
.removeClass(className.hover)
;
$icon
.removeClass(className.hover)
;
$activeIcon
.nextAll()
.removeClass(className.active)
;
$activeIcon
.addClass(className.active)
.prevAll()
.addClass(className.active)
;
$.proxy(settings.onRate, element)();
},
event: {
mouseenter: function() {
var
@ -138,11 +115,57 @@ $.fn.rating = function(parameters) {
},
click: function() {
var
$activeIcon = $(this)
$activeIcon = $(this),
currentRating = module.getRating(),
rating = $icon.index($activeIcon) + 1
;
if(settings.clearable && currentRating == rating) {
module.clearRating();
}
else {
module.setRating( rating );
}
}
},
clearRating: function() {
module.debug('Clearing current rating');
module.setRating(0);
},
getRating: function() {
var
currentRating = $icon.filter('.' + className.active).size()
;
module.verbose('Current rating retrieved', currentRating);
return currentRating;
},
setRating: function(rating) {
var
ratingIndex = (rating - 1 >= 0)
? (rating - 1)
: 0,
$activeIcon = $icon.eq(ratingIndex)
;
$module
.removeClass(className.hover)
;
$icon
.removeClass(className.hover)
.removeClass(className.active)
;
if(rating > 0) {
module.verbose('Setting current rating to', rating);
$activeIcon
.addClass(className.active)
.prevAll()
.addClass(className.active)
;
module.setRating( $icon.index($activeIcon) + 1);
}
$.proxy(settings.onRate, element)(rating);
},
setting: function(name, value) {
if(value !== undefined) {
if( $.isPlainObject(name) ) {
@ -231,9 +254,6 @@ $.fn.rating = function(parameters) {
if(moduleSelector) {
title += ' \'' + moduleSelector + '\'';
}
if($allModules.size() > 1) {
title += ' ' + '(' + $allModules.size() + ')';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
@ -336,7 +356,9 @@ $.fn.rating.settings = {
initialRating : 0,
interactive : true,
onRate : function(){},
clearable : false,
onRate : function(rating){},
error : {
method : 'The method you called is not defined'

31
node/src/files/build/less/modules/tab.js

@ -54,6 +54,15 @@
initialize: function() {
module.debug('Initializing Tabs', $module);
// set up automatic routing
if(settings.auto) {
module.verbose('Setting up automatic tab retrieval from server');
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
// attach history events
if(settings.history) {
if( $.address === undefined ) {
@ -65,11 +74,6 @@
return false;
}
else {
if(settings.auto) {
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
module.verbose('Address library found adding state change event');
$.address
.state(settings.path)
@ -78,9 +82,10 @@
;
}
}
// attach events if navigation wasn't set to window
if( !$.isWindow( element ) ) {
module.debug('Attaching events to tab activator', $module);
module.debug('Attaching tab activation events to element', $module);
$module
.on('click' + eventNamespace, module.event.click)
;
@ -103,7 +108,7 @@
},
event: {
click: function() {
click: function(event) {
module.debug('Navigation clicked');
var
tabPath = $(this).data(metadata.tab)
@ -115,6 +120,7 @@
else {
module.changeTab(tabPath);
}
event.preventDefault();
}
else {
module.debug('No tab specified');
@ -262,6 +268,7 @@
},
request = $tab.data(metadata.promise) || false,
existingRequest = ( request && request.state() === 'pending' ),
requestSettings,
cachedContent
;
@ -281,8 +288,10 @@
;
}
else if($.api !== undefined) {
module.debug('Retrieving remote content', fullTabPath);
$.api( $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings) );
console.log(settings.apiSettings);
requestSettings = $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings);
module.debug('Retrieving remote content', fullTabPath, requestSettings);
$.api( requestSettings );
}
else {
module.error(error.api);
@ -372,7 +381,7 @@
module.error(error.recursion);
}
else {
module.debug('No default tabs found for', tabPath);
module.debug('No default tabs found for', tabPath, $tabs);
}
recursionDepth = 0;
return tabPath;
@ -642,7 +651,7 @@
// max depth a tab can be nested
maxDepth : 25,
// dont load content on first load
ignoreFirstLoad : true,
ignoreFirstLoad : false,
// load tab content new every tab click
alwaysRefresh : false,
// cache the content requests to pull locally

80
node/src/files/build/minified/modules/rating.js

@ -87,29 +87,6 @@ $.fn.rating = function(parameters) {
;
},
setRating: function(rating) {
var
$activeIcon = $icon.eq(rating - 1)
;
module.verbose('Setting current rating to', rating);
$module
.removeClass(className.hover)
;
$icon
.removeClass(className.hover)
;
$activeIcon
.nextAll()
.removeClass(className.active)
;
$activeIcon
.addClass(className.active)
.prevAll()
.addClass(className.active)
;
$.proxy(settings.onRate, element)();
},
event: {
mouseenter: function() {
var
@ -138,11 +115,57 @@ $.fn.rating = function(parameters) {
},
click: function() {
var
$activeIcon = $(this)
$activeIcon = $(this),
currentRating = module.getRating(),
rating = $icon.index($activeIcon) + 1
;
if(settings.clearable && currentRating == rating) {
module.clearRating();
}
else {
module.setRating( rating );
}
}
},
clearRating: function() {
module.debug('Clearing current rating');
module.setRating(0);
},
getRating: function() {
var
currentRating = $icon.filter('.' + className.active).size()
;
module.verbose('Current rating retrieved', currentRating);
return currentRating;
},
setRating: function(rating) {
var
ratingIndex = (rating - 1 >= 0)
? (rating - 1)
: 0,
$activeIcon = $icon.eq(ratingIndex)
;
$module
.removeClass(className.hover)
;
$icon
.removeClass(className.hover)
.removeClass(className.active)
;
if(rating > 0) {
module.verbose('Setting current rating to', rating);
$activeIcon
.addClass(className.active)
.prevAll()
.addClass(className.active)
;
module.setRating( $icon.index($activeIcon) + 1);
}
$.proxy(settings.onRate, element)(rating);
},
setting: function(name, value) {
if(value !== undefined) {
if( $.isPlainObject(name) ) {
@ -231,9 +254,6 @@ $.fn.rating = function(parameters) {
if(moduleSelector) {
title += ' \'' + moduleSelector + '\'';
}
if($allModules.size() > 1) {
title += ' ' + '(' + $allModules.size() + ')';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
@ -336,7 +356,9 @@ $.fn.rating.settings = {
initialRating : 0,
interactive : true,
onRate : function(){},
clearable : false,
onRate : function(rating){},
error : {
method : 'The method you called is not defined'

31
node/src/files/build/minified/modules/tab.js

@ -54,6 +54,15 @@
initialize: function() {
module.debug('Initializing Tabs', $module);
// set up automatic routing
if(settings.auto) {
module.verbose('Setting up automatic tab retrieval from server');
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
// attach history events
if(settings.history) {
if( $.address === undefined ) {
@ -65,11 +74,6 @@
return false;
}
else {
if(settings.auto) {
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
module.verbose('Address library found adding state change event');
$.address
.state(settings.path)
@ -78,9 +82,10 @@
;
}
}
// attach events if navigation wasn't set to window
if( !$.isWindow( element ) ) {
module.debug('Attaching events to tab activator', $module);
module.debug('Attaching tab activation events to element', $module);
$module
.on('click' + eventNamespace, module.event.click)
;
@ -103,7 +108,7 @@
},
event: {
click: function() {
click: function(event) {
module.debug('Navigation clicked');
var
tabPath = $(this).data(metadata.tab)
@ -115,6 +120,7 @@
else {
module.changeTab(tabPath);
}
event.preventDefault();
}
else {
module.debug('No tab specified');
@ -262,6 +268,7 @@
},
request = $tab.data(metadata.promise) || false,
existingRequest = ( request && request.state() === 'pending' ),
requestSettings,
cachedContent
;
@ -281,8 +288,10 @@
;
}
else if($.api !== undefined) {
module.debug('Retrieving remote content', fullTabPath);
$.api( $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings) );
console.log(settings.apiSettings);
requestSettings = $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings);
module.debug('Retrieving remote content', fullTabPath, requestSettings);
$.api( requestSettings );
}
else {
module.error(error.api);
@ -372,7 +381,7 @@
module.error(error.recursion);
}
else {
module.debug('No default tabs found for', tabPath);
module.debug('No default tabs found for', tabPath, $tabs);
}
recursionDepth = 0;
return tabPath;
@ -642,7 +651,7 @@
// max depth a tab can be nested
maxDepth : 25,
// dont load content on first load
ignoreFirstLoad : true,
ignoreFirstLoad : false,
// load tab content new every tab click
alwaysRefresh : false,
// cache the content requests to pull locally

3
node/src/files/build/uncompressed/collections/grid.css

@ -78,7 +78,8 @@
--------------------*/
.ui.page.grid {
margin: 0%;
padding: 0% 2%;
padding-left: 0%;
padding-right: 0%;
}
/*-------------------
Responsive

80
node/src/files/build/uncompressed/modules/rating.js

@ -87,29 +87,6 @@ $.fn.rating = function(parameters) {
;
},
setRating: function(rating) {
var
$activeIcon = $icon.eq(rating - 1)
;
module.verbose('Setting current rating to', rating);
$module
.removeClass(className.hover)
;
$icon
.removeClass(className.hover)
;
$activeIcon
.nextAll()
.removeClass(className.active)
;
$activeIcon
.addClass(className.active)
.prevAll()
.addClass(className.active)
;
$.proxy(settings.onRate, element)();
},
event: {
mouseenter: function() {
var
@ -138,11 +115,57 @@ $.fn.rating = function(parameters) {
},
click: function() {
var
$activeIcon = $(this)
$activeIcon = $(this),
currentRating = module.getRating(),
rating = $icon.index($activeIcon) + 1
;
if(settings.clearable && currentRating == rating) {
module.clearRating();
}
else {
module.setRating( rating );
}
}
},
clearRating: function() {
module.debug('Clearing current rating');
module.setRating(0);
},
getRating: function() {
var
currentRating = $icon.filter('.' + className.active).size()
;
module.verbose('Current rating retrieved', currentRating);
return currentRating;
},
setRating: function(rating) {
var
ratingIndex = (rating - 1 >= 0)
? (rating - 1)
: 0,
$activeIcon = $icon.eq(ratingIndex)
;
$module
.removeClass(className.hover)
;
$icon
.removeClass(className.hover)
.removeClass(className.active)
;
if(rating > 0) {
module.verbose('Setting current rating to', rating);
$activeIcon
.addClass(className.active)
.prevAll()
.addClass(className.active)
;
module.setRating( $icon.index($activeIcon) + 1);
}
$.proxy(settings.onRate, element)(rating);
},
setting: function(name, value) {
if(value !== undefined) {
if( $.isPlainObject(name) ) {
@ -231,9 +254,6 @@ $.fn.rating = function(parameters) {
if(moduleSelector) {
title += ' \'' + moduleSelector + '\'';
}
if($allModules.size() > 1) {
title += ' ' + '(' + $allModules.size() + ')';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
@ -336,7 +356,9 @@ $.fn.rating.settings = {
initialRating : 0,
interactive : true,
onRate : function(){},
clearable : false,
onRate : function(rating){},
error : {
method : 'The method you called is not defined'

31
node/src/files/build/uncompressed/modules/tab.js

@ -54,6 +54,15 @@
initialize: function() {
module.debug('Initializing Tabs', $module);
// set up automatic routing
if(settings.auto) {
module.verbose('Setting up automatic tab retrieval from server');
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
// attach history events
if(settings.history) {
if( $.address === undefined ) {
@ -65,11 +74,6 @@
return false;
}
else {
if(settings.auto) {
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
module.verbose('Address library found adding state change event');
$.address
.state(settings.path)
@ -78,9 +82,10 @@
;
}
}
// attach events if navigation wasn't set to window
if( !$.isWindow( element ) ) {
module.debug('Attaching events to tab activator', $module);
module.debug('Attaching tab activation events to element', $module);
$module
.on('click' + eventNamespace, module.event.click)
;
@ -103,7 +108,7 @@
},
event: {
click: function() {
click: function(event) {
module.debug('Navigation clicked');
var
tabPath = $(this).data(metadata.tab)
@ -115,6 +120,7 @@
else {
module.changeTab(tabPath);
}
event.preventDefault();
}
else {
module.debug('No tab specified');
@ -262,6 +268,7 @@
},
request = $tab.data(metadata.promise) || false,
existingRequest = ( request && request.state() === 'pending' ),
requestSettings,
cachedContent
;
@ -281,8 +288,10 @@
;
}
else if($.api !== undefined) {
module.debug('Retrieving remote content', fullTabPath);
$.api( $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings) );
console.log(settings.apiSettings);
requestSettings = $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings);
module.debug('Retrieving remote content', fullTabPath, requestSettings);
$.api( requestSettings );
}
else {
module.error(error.api);
@ -372,7 +381,7 @@
module.error(error.recursion);
}
else {
module.debug('No default tabs found for', tabPath);
module.debug('No default tabs found for', tabPath, $tabs);
}
recursionDepth = 0;
return tabPath;
@ -642,7 +651,7 @@
// max depth a tab can be nested
maxDepth : 25,
// dont load content on first load
ignoreFirstLoad : true,
ignoreFirstLoad : false,
// load tab content new every tab click
alwaysRefresh : false,
// cache the content requests to pull locally

25
node/src/files/javascript/tab.js

@ -5,7 +5,6 @@ semantic.dropdown.ready = function() {
// selector cache
var
$examples = $('.example'),
// alias
handler
;
@ -15,10 +14,26 @@ semantic.dropdown.ready = function() {
};
$('.demo.menu')
.first()
.find('.item')
.tab()
$('.first.example .menu .item')
.tab({
context: '.first.example'
})
;
$('.history.example .menu .item')
.tab({
context : '.history.example',
history : true,
path : '/modules/tab.html'
})
;
$('.dynamic.example .menu .item')
.tab({
context : '.dynamic.example',
auto : true,
path : '/modules/tab.html'
})
;
};

80
src/modules/rating.js

@ -87,29 +87,6 @@ $.fn.rating = function(parameters) {
;
},
setRating: function(rating) {
var
$activeIcon = $icon.eq(rating - 1)
;
module.verbose('Setting current rating to', rating);
$module
.removeClass(className.hover)
;
$icon
.removeClass(className.hover)
;
$activeIcon
.nextAll()
.removeClass(className.active)
;
$activeIcon
.addClass(className.active)
.prevAll()
.addClass(className.active)
;
$.proxy(settings.onRate, element)();
},
event: {
mouseenter: function() {
var
@ -138,11 +115,57 @@ $.fn.rating = function(parameters) {
},
click: function() {
var
$activeIcon = $(this)
$activeIcon = $(this),
currentRating = module.getRating(),
rating = $icon.index($activeIcon) + 1
;
if(settings.clearable && currentRating == rating) {
module.clearRating();
}
else {
module.setRating( rating );
}
}
},
clearRating: function() {
module.debug('Clearing current rating');
module.setRating(0);
},
getRating: function() {
var
currentRating = $icon.filter('.' + className.active).size()
;
module.verbose('Current rating retrieved', currentRating);
return currentRating;
},
setRating: function(rating) {
var
ratingIndex = (rating - 1 >= 0)
? (rating - 1)
: 0,
$activeIcon = $icon.eq(ratingIndex)
;
$module
.removeClass(className.hover)
;
$icon
.removeClass(className.hover)
.removeClass(className.active)
;
if(rating > 0) {
module.verbose('Setting current rating to', rating);
$activeIcon
.addClass(className.active)
.prevAll()
.addClass(className.active)
;
module.setRating( $icon.index($activeIcon) + 1);
}
$.proxy(settings.onRate, element)(rating);
},
setting: function(name, value) {
if(value !== undefined) {
if( $.isPlainObject(name) ) {
@ -231,9 +254,6 @@ $.fn.rating = function(parameters) {
if(moduleSelector) {
title += ' \'' + moduleSelector + '\'';
}
if($allModules.size() > 1) {
title += ' ' + '(' + $allModules.size() + ')';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
@ -336,7 +356,9 @@ $.fn.rating.settings = {
initialRating : 0,
interactive : true,
onRate : function(){},
clearable : false,
onRate : function(rating){},
error : {
method : 'The method you called is not defined'

31
src/modules/tab.js

@ -54,6 +54,15 @@
initialize: function() {
module.debug('Initializing Tabs', $module);
// set up automatic routing
if(settings.auto) {
module.verbose('Setting up automatic tab retrieval from server');
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
// attach history events
if(settings.history) {
if( $.address === undefined ) {
@ -65,11 +74,6 @@
return false;
}
else {
if(settings.auto) {
settings.apiSettings = {
url: settings.path + '/{$tab}'
};
}
module.verbose('Address library found adding state change event');
$.address
.state(settings.path)
@ -78,9 +82,10 @@
;
}
}
// attach events if navigation wasn't set to window
if( !$.isWindow( element ) ) {
module.debug('Attaching events to tab activator', $module);
module.debug('Attaching tab activation events to element', $module);
$module
.on('click' + eventNamespace, module.event.click)
;
@ -103,7 +108,7 @@
},
event: {
click: function() {
click: function(event) {
module.debug('Navigation clicked');
var
tabPath = $(this).data(metadata.tab)
@ -115,6 +120,7 @@
else {
module.changeTab(tabPath);
}
event.preventDefault();
}
else {
module.debug('No tab specified');
@ -262,6 +268,7 @@
},
request = $tab.data(metadata.promise) || false,
existingRequest = ( request && request.state() === 'pending' ),
requestSettings,
cachedContent
;
@ -281,8 +288,10 @@
;
}
else if($.api !== undefined) {
module.debug('Retrieving remote content', fullTabPath);
$.api( $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings) );
console.log(settings.apiSettings);
requestSettings = $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings);
module.debug('Retrieving remote content', fullTabPath, requestSettings);
$.api( requestSettings );
}
else {
module.error(error.api);
@ -372,7 +381,7 @@
module.error(error.recursion);
}
else {
module.debug('No default tabs found for', tabPath);
module.debug('No default tabs found for', tabPath, $tabs);
}
recursionDepth = 0;
return tabPath;
@ -642,7 +651,7 @@
// max depth a tab can be nested
maxDepth : 25,
// dont load content on first load
ignoreFirstLoad : true,
ignoreFirstLoad : false,
// load tab content new every tab click
alwaysRefresh : false,
// cache the content requests to pull locally

Loading…
Cancel
Save