fennec 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. data/lib/fennec/version.rb +1 -1
  2. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  3. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  4. data/vendor/assets/javascripts/README.md +106 -0
  5. data/vendor/assets/javascripts/bootstrap-alert.js +91 -0
  6. data/vendor/assets/javascripts/bootstrap-button.js +98 -0
  7. data/vendor/assets/javascripts/bootstrap-carousel.js +154 -0
  8. data/vendor/assets/javascripts/bootstrap-collapse.js +136 -0
  9. data/vendor/assets/javascripts/bootstrap-dropdown.js +92 -0
  10. data/vendor/assets/javascripts/bootstrap-modal.js +210 -0
  11. data/vendor/assets/javascripts/bootstrap-popover.js +95 -0
  12. data/vendor/assets/javascripts/bootstrap-scrollspy.js +125 -0
  13. data/vendor/assets/javascripts/bootstrap-tab.js +130 -0
  14. data/vendor/assets/javascripts/bootstrap-tooltip.js +270 -0
  15. data/vendor/assets/javascripts/bootstrap-transition.js +51 -0
  16. data/vendor/assets/javascripts/bootstrap-typeahead.js +271 -0
  17. data/vendor/assets/javascripts/tests/index.html +49 -0
  18. data/vendor/assets/javascripts/tests/unit/bootstrap-alert.js +41 -0
  19. data/vendor/assets/javascripts/tests/unit/bootstrap-button.js +54 -0
  20. data/vendor/assets/javascripts/tests/unit/bootstrap-collapse.js +25 -0
  21. data/vendor/assets/javascripts/tests/unit/bootstrap-dropdown.js +53 -0
  22. data/vendor/assets/javascripts/tests/unit/bootstrap-modal.js +85 -0
  23. data/vendor/assets/javascripts/tests/unit/bootstrap-popover.js +93 -0
  24. data/vendor/assets/javascripts/tests/unit/bootstrap-scrollspy.js +31 -0
  25. data/vendor/assets/javascripts/tests/unit/bootstrap-tab.js +45 -0
  26. data/vendor/assets/javascripts/tests/unit/bootstrap-tooltip.js +62 -0
  27. data/vendor/assets/javascripts/tests/unit/bootstrap-transition.js +13 -0
  28. data/vendor/assets/javascripts/tests/unit/bootstrap-typeahead.js +128 -0
  29. data/vendor/assets/javascripts/tests/vendor/jquery.js +9252 -0
  30. data/vendor/assets/javascripts/tests/vendor/qunit.css +232 -0
  31. data/vendor/assets/javascripts/tests/vendor/qunit.js +1510 -0
  32. data/vendor/assets/stylesheets/bootstrap/accordion.less +28 -0
  33. data/vendor/assets/stylesheets/bootstrap/alerts.less +70 -0
  34. data/vendor/assets/stylesheets/bootstrap/bootstrap.less +41 -5
  35. data/vendor/assets/stylesheets/bootstrap/breadcrumbs.less +22 -0
  36. data/vendor/assets/stylesheets/bootstrap/button-groups.less +147 -0
  37. data/vendor/assets/stylesheets/bootstrap/buttons.less +165 -0
  38. data/vendor/assets/stylesheets/bootstrap/carousel.less +121 -0
  39. data/vendor/assets/stylesheets/bootstrap/close.less +18 -0
  40. data/vendor/assets/stylesheets/bootstrap/code.less +44 -0
  41. data/vendor/assets/stylesheets/bootstrap/component-animations.less +18 -0
  42. data/vendor/assets/stylesheets/bootstrap/dropdowns.less +131 -0
  43. data/vendor/assets/stylesheets/bootstrap/forms.less +355 -305
  44. data/vendor/assets/stylesheets/bootstrap/grid.less +8 -0
  45. data/vendor/assets/stylesheets/bootstrap/hero-unit.less +20 -0
  46. data/vendor/assets/stylesheets/bootstrap/labels.less +16 -0
  47. data/vendor/assets/stylesheets/bootstrap/layouts.less +17 -0
  48. data/vendor/assets/stylesheets/bootstrap/mixins.less +410 -90
  49. data/vendor/assets/stylesheets/bootstrap/modals.less +72 -0
  50. data/vendor/assets/stylesheets/bootstrap/navbar.less +292 -0
  51. data/vendor/assets/stylesheets/bootstrap/navs.less +344 -0
  52. data/vendor/assets/stylesheets/bootstrap/pager.less +30 -0
  53. data/vendor/assets/stylesheets/bootstrap/pagination.less +55 -0
  54. data/vendor/assets/stylesheets/bootstrap/popovers.less +49 -0
  55. data/vendor/assets/stylesheets/bootstrap/progress-bars.less +95 -0
  56. data/vendor/assets/stylesheets/bootstrap/reset.less +37 -52
  57. data/vendor/assets/stylesheets/bootstrap/responsive.less +323 -0
  58. data/vendor/assets/stylesheets/bootstrap/scaffolding.less +13 -119
  59. data/vendor/assets/stylesheets/bootstrap/sprites.less +156 -0
  60. data/vendor/assets/stylesheets/bootstrap/tables.less +99 -131
  61. data/vendor/assets/stylesheets/bootstrap/thumbnails.less +35 -0
  62. data/vendor/assets/stylesheets/bootstrap/tooltip.less +35 -0
  63. data/vendor/assets/stylesheets/bootstrap/type.less +100 -70
  64. data/vendor/assets/stylesheets/bootstrap/utilities.less +23 -0
  65. data/vendor/assets/stylesheets/bootstrap/variables.less +94 -55
  66. data/vendor/assets/stylesheets/bootstrap/wells.less +17 -0
  67. data/vendor/assets/stylesheets/bootstrap-responsive.css +567 -0
  68. data/vendor/assets/stylesheets/bootstrap.css +3365 -0
  69. data/vendor/assets/stylesheets/docs.css +646 -173
  70. metadata +70 -23
  71. data/vendor/assets/javascripts/bootstrap/alerts.js +0 -104
  72. data/vendor/assets/javascripts/bootstrap/dropdown.js +0 -50
  73. data/vendor/assets/javascripts/bootstrap/jquery.tablesorter.min.js +0 -4
  74. data/vendor/assets/javascripts/bootstrap/modal.js +0 -231
  75. data/vendor/assets/javascripts/bootstrap/popover.js +0 -77
  76. data/vendor/assets/javascripts/bootstrap/scrollspy.js +0 -105
  77. data/vendor/assets/javascripts/bootstrap/tabs.js +0 -62
  78. data/vendor/assets/javascripts/bootstrap/twipsy.js +0 -307
  79. data/vendor/assets/javascripts/bootstrap.config.js +0 -52
  80. data/vendor/assets/stylesheets/bootstrap/patterns.less +0 -1005
  81. data/vendor/assets/stylesheets/bootstrap-1.3.0.css +0 -2362
  82. data/vendor/assets/stylesheets/bootstrap-1.3.0.min.css +0 -330
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fennec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-20 00:00:00.000000000Z
12
+ date: 2012-02-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &70293666557040 !ruby/object:Gem::Requirement
16
+ requirement: &2153658740 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70293666557040
24
+ version_requirements: *2153658740
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thor
27
- requirement: &70293666556340 !ruby/object:Gem::Requirement
27
+ requirement: &2153140640 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.14'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70293666556340
35
+ version_requirements: *2153140640
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &70293666555760 !ruby/object:Gem::Requirement
38
+ requirement: &2153139160 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.0.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70293666555760
46
+ version_requirements: *2153139160
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rails
49
- requirement: &70293666555080 !ruby/object:Gem::Requirement
49
+ requirement: &2153137640 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '3.0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70293666555080
57
+ version_requirements: *2153137640
58
58
  description: Twitter Bootstrap CSS toolkit for Rails 3 projects
59
59
  email:
60
60
  - hansay99@gmail.com
@@ -73,26 +73,73 @@ files:
73
73
  - lib/fennec/helpers/action_view_extension.rb
74
74
  - lib/fennec/railtie.rb
75
75
  - lib/fennec/version.rb
76
- - vendor/assets/javascripts/bootstrap.config.js
77
- - vendor/assets/javascripts/bootstrap/alerts.js
78
- - vendor/assets/javascripts/bootstrap/dropdown.js
79
- - vendor/assets/javascripts/bootstrap/jquery.tablesorter.min.js
80
- - vendor/assets/javascripts/bootstrap/modal.js
81
- - vendor/assets/javascripts/bootstrap/popover.js
82
- - vendor/assets/javascripts/bootstrap/scrollspy.js
83
- - vendor/assets/javascripts/bootstrap/tabs.js
84
- - vendor/assets/javascripts/bootstrap/twipsy.js
85
- - vendor/assets/stylesheets/bootstrap-1.3.0.css
86
- - vendor/assets/stylesheets/bootstrap-1.3.0.min.css
76
+ - vendor/assets/images/glyphicons-halflings-white.png
77
+ - vendor/assets/images/glyphicons-halflings.png
78
+ - vendor/assets/javascripts/README.md
79
+ - vendor/assets/javascripts/bootstrap-alert.js
80
+ - vendor/assets/javascripts/bootstrap-button.js
81
+ - vendor/assets/javascripts/bootstrap-carousel.js
82
+ - vendor/assets/javascripts/bootstrap-collapse.js
83
+ - vendor/assets/javascripts/bootstrap-dropdown.js
84
+ - vendor/assets/javascripts/bootstrap-modal.js
85
+ - vendor/assets/javascripts/bootstrap-popover.js
86
+ - vendor/assets/javascripts/bootstrap-scrollspy.js
87
+ - vendor/assets/javascripts/bootstrap-tab.js
88
+ - vendor/assets/javascripts/bootstrap-tooltip.js
89
+ - vendor/assets/javascripts/bootstrap-transition.js
90
+ - vendor/assets/javascripts/bootstrap-typeahead.js
91
+ - vendor/assets/javascripts/tests/index.html
92
+ - vendor/assets/javascripts/tests/unit/bootstrap-alert.js
93
+ - vendor/assets/javascripts/tests/unit/bootstrap-button.js
94
+ - vendor/assets/javascripts/tests/unit/bootstrap-collapse.js
95
+ - vendor/assets/javascripts/tests/unit/bootstrap-dropdown.js
96
+ - vendor/assets/javascripts/tests/unit/bootstrap-modal.js
97
+ - vendor/assets/javascripts/tests/unit/bootstrap-popover.js
98
+ - vendor/assets/javascripts/tests/unit/bootstrap-scrollspy.js
99
+ - vendor/assets/javascripts/tests/unit/bootstrap-tab.js
100
+ - vendor/assets/javascripts/tests/unit/bootstrap-tooltip.js
101
+ - vendor/assets/javascripts/tests/unit/bootstrap-transition.js
102
+ - vendor/assets/javascripts/tests/unit/bootstrap-typeahead.js
103
+ - vendor/assets/javascripts/tests/vendor/jquery.js
104
+ - vendor/assets/javascripts/tests/vendor/qunit.css
105
+ - vendor/assets/javascripts/tests/vendor/qunit.js
106
+ - vendor/assets/stylesheets/bootstrap-responsive.css
107
+ - vendor/assets/stylesheets/bootstrap.css
108
+ - vendor/assets/stylesheets/bootstrap/accordion.less
109
+ - vendor/assets/stylesheets/bootstrap/alerts.less
87
110
  - vendor/assets/stylesheets/bootstrap/bootstrap.less
111
+ - vendor/assets/stylesheets/bootstrap/breadcrumbs.less
112
+ - vendor/assets/stylesheets/bootstrap/button-groups.less
113
+ - vendor/assets/stylesheets/bootstrap/buttons.less
114
+ - vendor/assets/stylesheets/bootstrap/carousel.less
115
+ - vendor/assets/stylesheets/bootstrap/close.less
116
+ - vendor/assets/stylesheets/bootstrap/code.less
117
+ - vendor/assets/stylesheets/bootstrap/component-animations.less
118
+ - vendor/assets/stylesheets/bootstrap/dropdowns.less
88
119
  - vendor/assets/stylesheets/bootstrap/forms.less
120
+ - vendor/assets/stylesheets/bootstrap/grid.less
121
+ - vendor/assets/stylesheets/bootstrap/hero-unit.less
122
+ - vendor/assets/stylesheets/bootstrap/labels.less
123
+ - vendor/assets/stylesheets/bootstrap/layouts.less
89
124
  - vendor/assets/stylesheets/bootstrap/mixins.less
90
- - vendor/assets/stylesheets/bootstrap/patterns.less
125
+ - vendor/assets/stylesheets/bootstrap/modals.less
126
+ - vendor/assets/stylesheets/bootstrap/navbar.less
127
+ - vendor/assets/stylesheets/bootstrap/navs.less
128
+ - vendor/assets/stylesheets/bootstrap/pager.less
129
+ - vendor/assets/stylesheets/bootstrap/pagination.less
130
+ - vendor/assets/stylesheets/bootstrap/popovers.less
131
+ - vendor/assets/stylesheets/bootstrap/progress-bars.less
91
132
  - vendor/assets/stylesheets/bootstrap/reset.less
133
+ - vendor/assets/stylesheets/bootstrap/responsive.less
92
134
  - vendor/assets/stylesheets/bootstrap/scaffolding.less
135
+ - vendor/assets/stylesheets/bootstrap/sprites.less
93
136
  - vendor/assets/stylesheets/bootstrap/tables.less
137
+ - vendor/assets/stylesheets/bootstrap/thumbnails.less
138
+ - vendor/assets/stylesheets/bootstrap/tooltip.less
94
139
  - vendor/assets/stylesheets/bootstrap/type.less
140
+ - vendor/assets/stylesheets/bootstrap/utilities.less
95
141
  - vendor/assets/stylesheets/bootstrap/variables.less
142
+ - vendor/assets/stylesheets/bootstrap/wells.less
96
143
  - vendor/assets/stylesheets/docs.css
97
144
  homepage: https://github.com/jerryshen/fennec
98
145
  licenses: []
@@ -114,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
161
  version: '0'
115
162
  requirements: []
116
163
  rubyforge_project: fennec
117
- rubygems_version: 1.8.8
164
+ rubygems_version: 1.8.10
118
165
  signing_key:
119
166
  specification_version: 3
120
167
  summary: Twitter Bootstrap CSS toolkit for Rails 3 projects
@@ -1,104 +0,0 @@
1
- /* ==========================================================
2
- * bootstrap-alerts.js v1.3.0
3
- * http://twitter.github.com/bootstrap/javascript.html#alerts
4
- * ==========================================================
5
- * Copyright 2011 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- * ========================================================== */
19
-
20
-
21
- !function( $ ){
22
-
23
- /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
24
- * ======================================================= */
25
-
26
- var transitionEnd
27
-
28
- $(document).ready(function () {
29
-
30
- $.support.transition = (function () {
31
- var thisBody = document.body || document.documentElement
32
- , thisStyle = thisBody.style
33
- , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
34
- return support
35
- })()
36
-
37
- // set CSS transition event type
38
- if ( $.support.transition ) {
39
- transitionEnd = "TransitionEnd"
40
- if ( $.browser.webkit ) {
41
- transitionEnd = "webkitTransitionEnd"
42
- } else if ( $.browser.mozilla ) {
43
- transitionEnd = "transitionend"
44
- } else if ( $.browser.opera ) {
45
- transitionEnd = "oTransitionEnd"
46
- }
47
- }
48
-
49
- })
50
-
51
- /* ALERT CLASS DEFINITION
52
- * ====================== */
53
-
54
- var Alert = function ( content, selector ) {
55
- this.$element = $(content)
56
- .delegate(selector || '.close', 'click', this.close)
57
- }
58
-
59
- Alert.prototype = {
60
-
61
- close: function (e) {
62
- var $element = $(this).parent('.alert-message')
63
-
64
- e && e.preventDefault()
65
- $element.removeClass('in')
66
-
67
- function removeElement () {
68
- $element.remove()
69
- }
70
-
71
- $.support.transition && $element.hasClass('fade') ?
72
- $element.bind(transitionEnd, removeElement) :
73
- removeElement()
74
- }
75
-
76
- }
77
-
78
-
79
- /* ALERT PLUGIN DEFINITION
80
- * ======================= */
81
-
82
- $.fn.alert = function ( options ) {
83
-
84
- if ( options === true ) {
85
- return this.data('alert')
86
- }
87
-
88
- return this.each(function () {
89
- var $this = $(this)
90
-
91
- if ( typeof options == 'string' ) {
92
- return $this.data('alert')[options]()
93
- }
94
-
95
- $(this).data('alert', new Alert( this ))
96
-
97
- })
98
- }
99
-
100
- $(document).ready(function () {
101
- new Alert($('body'), '.alert-message[data-alert] .close')
102
- })
103
-
104
- }( window.jQuery || window.ender )
@@ -1,50 +0,0 @@
1
- /* ============================================================
2
- * bootstrap-dropdown.js v1.3.0
3
- * http://twitter.github.com/bootstrap/javascript.html#dropdown
4
- * ============================================================
5
- * Copyright 2011 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- * ============================================================ */
19
-
20
-
21
- !function( $ ){
22
-
23
- var d = 'a.menu, .dropdown-toggle'
24
-
25
- function clearMenus() {
26
- $(d).parent('li').removeClass('open')
27
- }
28
-
29
- $(function () {
30
- $('html').bind("click", clearMenus)
31
- $('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' )
32
- })
33
-
34
- /* DROPDOWN PLUGIN DEFINITION
35
- * ========================== */
36
-
37
- $.fn.dropdown = function ( selector ) {
38
- return this.each(function () {
39
- $(this).delegate(selector || d, 'click', function (e) {
40
- var li = $(this).parent('li')
41
- , isActive = li.hasClass('open')
42
-
43
- clearMenus()
44
- !isActive && li.toggleClass('open')
45
- return false
46
- })
47
- })
48
- }
49
-
50
- }( window.jQuery || window.ender )
@@ -1,4 +0,0 @@
1
-
2
- (function($){$.extend({tablesorter:new
3
- function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,rows,-1,i);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,rows,rowIndex,cellIndex){var l=parsers.length,node=false,nodeValue=false,keepLooking=true;while(nodeValue==''&&keepLooking){rowIndex++;if(rows[rowIndex]){node=getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex);nodeValue=trimAndGetNodeText(table.config,node);if(table.config.debug){log('Checking if value was empty on row:'+rowIndex);}}else{keepLooking=false;}}for(var i=1;i<l;i++){if(parsers[i].is(nodeValue,table,node)){return parsers[i];}}return parsers[0];}function getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex){return rows[rowIndex].cells[cellIndex];}function trimAndGetNodeText(config,node){return $.trim(getElementText(config,node));}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=$(table.tBodies[0].rows[i]),cols=[];if(c.hasClass(table.config.cssChildRow)){cache.row[cache.row.length-1]=cache.row[cache.row.length-1].add(c);continue;}cache.row.push(c);for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c[0].cells[j]),table,c[0].cells[j]));}cols.push(cache.normalized.length);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){var text="";if(!node)return"";if(!config.supportsTextContent)config.supportsTextContent=node.textContent||false;if(config.textExtraction=="simple"){if(config.supportsTextContent){text=node.textContent;}else{if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){text=node.childNodes[0].innerHTML;}else{text=node.innerHTML;}}}else{if(typeof(config.textExtraction)=="function"){text=config.textExtraction(node);}else{text=$(node).text();}}return text;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){var pos=n[i][checkCell];rows.push(r[pos]);if(!table.config.appender){var l=r[pos].length;for(var j=0;j<l;j++){tableBody[0].appendChild(r[pos][j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false;var header_index=computeTableHeaderCellIndexes(table);$tableHeaders=$(table.config.selectorHeaders,table).each(function(index){this.column=header_index[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=formatSortingOrder(table.config.sortInitialOrder);this.count=this.order;if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(checkHeaderOptionsSortingLocked(table,index))this.order=this.lockedOrder=checkHeaderOptionsSortingLocked(table,index);if(!this.sortDisabled){var $th=$(this).addClass(table.config.cssHeader);if(table.config.onRenderHeader)table.config.onRenderHeader.apply($th);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function computeTableHeaderCellIndexes(t){var matrix=[];var lookup={};var thead=t.getElementsByTagName('THEAD')[0];var trs=thead.getElementsByTagName('TR');for(var i=0;i<trs.length;i++){var cells=trs[i].cells;for(var j=0;j<cells.length;j++){var c=cells[j];var rowIndex=c.parentNode.rowIndex;var cellId=rowIndex+"-"+c.cellIndex;var rowSpan=c.rowSpan||1;var colSpan=c.colSpan||1
4
- var firstAvailCol;if(typeof(matrix[rowIndex])=="undefined"){matrix[rowIndex]=[];}for(var k=0;k<matrix[rowIndex].length+1;k++){if(typeof(matrix[rowIndex][k])=="undefined"){firstAvailCol=k;break;}}lookup[cellId]=firstAvailCol;for(var k=rowIndex;k<rowIndex+rowSpan;k++){if(typeof(matrix[k])=="undefined"){matrix[k]=[];}var matrixrow=matrix[k];for(var l=firstAvailCol;l<firstAvailCol+colSpan;l++){matrixrow[l]="x";}}}}return lookup;}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){return(v.toLowerCase()=="desc")?1:0;}else{return(v==1)?1:0;}}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(table.config.parsers[c].type=="text")?((order==0)?makeSortFunction("text","asc",c):makeSortFunction("text","desc",c)):((order==0)?makeSortFunction("numeric","asc",c):makeSortFunction("numeric","desc",c));var e="e"+i;dynamicExp+="var "+e+" = "+s;dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";if(table.config.debug){benchmark("Evaling expression:"+dynamicExp,new Date());}eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function makeSortFunction(type,direction,index){var a="a["+index+"]",b="b["+index+"]";if(type=='text'&&direction=='asc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+a+" < "+b+") ? -1 : 1 )));";}else if(type=='text'&&direction=='desc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+b+" < "+a+") ? -1 : 1 )));";}else if(type=='numeric'&&direction=='asc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+a+" - "+b+"));";}else if(type=='numeric'&&direction=='desc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+b+" - "+a+"));";}};function makeSortText(i){return"((a["+i+"] < b["+i+"]) ? -1 : ((a["+i+"] > b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){var me=this;setTimeout(function(){me.config.parsers=buildParserCache(me,$headers);cache=buildCache(me);},1);}).bind("updateCell",function(e,cell){var config=this.config;var pos=[(cell.parentNode.rowIndex-1),cell.cellIndex];cache.normalized[pos[0]][pos[1]]=config.parsers[pos[1]].format(getElementText(config,cell),cell);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){return/^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g,'')));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLocaleLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[£$€]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}var $tr,row=-1,odd;$("tr:visible",table.tBodies[0]).each(function(i){$tr=$(this);if(!$tr.hasClass(table.config.cssChildRow))row++;odd=(row%2==0);$tr.removeClass(table.config.widgetZebra.css[odd?0:1]).addClass(table.config.widgetZebra.css[odd?1:0])});if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
@@ -1,231 +0,0 @@
1
- /* =========================================================
2
- * bootstrap-modal.js v1.3.0
3
- * http://twitter.github.com/bootstrap/javascript.html#modal
4
- * =========================================================
5
- * Copyright 2011 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- * ========================================================= */
19
-
20
-
21
- !function( $ ){
22
-
23
- /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
24
- * ======================================================= */
25
-
26
- var transitionEnd
27
-
28
- $(document).ready(function () {
29
-
30
- $.support.transition = (function () {
31
- var thisBody = document.body || document.documentElement
32
- , thisStyle = thisBody.style
33
- , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
34
- return support
35
- })()
36
-
37
- // set CSS transition event type
38
- if ( $.support.transition ) {
39
- transitionEnd = "TransitionEnd"
40
- if ( $.browser.webkit ) {
41
- transitionEnd = "webkitTransitionEnd"
42
- } else if ( $.browser.mozilla ) {
43
- transitionEnd = "transitionend"
44
- } else if ( $.browser.opera ) {
45
- transitionEnd = "oTransitionEnd"
46
- }
47
- }
48
-
49
- })
50
-
51
-
52
- /* MODAL PUBLIC CLASS DEFINITION
53
- * ============================= */
54
-
55
- var Modal = function ( content, options ) {
56
- this.settings = $.extend({}, $.fn.modal.defaults)
57
- this.$element = $(content)
58
- .delegate('.close', 'click.modal', $.proxy(this.hide, this))
59
-
60
- if ( options ) {
61
- $.extend( this.settings, options )
62
-
63
- if ( options.show ) {
64
- this.show()
65
- }
66
- }
67
-
68
- return this
69
- }
70
-
71
- Modal.prototype = {
72
-
73
- toggle: function () {
74
- return this[!this.isShown ? 'show' : 'hide']()
75
- }
76
-
77
- , show: function () {
78
- var that = this
79
- this.isShown = true
80
- this.$element.trigger('show')
81
-
82
- escape.call(this)
83
- backdrop.call(this, function () {
84
- that.$element
85
- .appendTo(document.body)
86
- .show()
87
-
88
- setTimeout(function () {
89
- that.$element
90
- .addClass('in')
91
- .trigger('shown')
92
- }, 0)
93
- })
94
-
95
- return this
96
- }
97
-
98
- , hide: function (e) {
99
- e && e.preventDefault()
100
-
101
- var that = this
102
- this.isShown = false
103
-
104
- escape.call(this)
105
-
106
- this.$element
107
- .trigger('hide')
108
- .removeClass('in')
109
-
110
- function removeElement () {
111
- that.$element
112
- .hide()
113
- .trigger('hidden')
114
-
115
- backdrop.call(that)
116
- }
117
-
118
- $.support.transition && this.$element.hasClass('fade') ?
119
- this.$element.one(transitionEnd, removeElement) :
120
- removeElement()
121
-
122
- return this
123
- }
124
-
125
- }
126
-
127
-
128
- /* MODAL PRIVATE METHODS
129
- * ===================== */
130
-
131
- function backdrop ( callback ) {
132
- var that = this
133
- , animate = this.$element.hasClass('fade') ? 'fade' : ''
134
- if ( this.isShown && this.settings.backdrop ) {
135
- this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
136
- .appendTo(document.body)
137
-
138
- if ( this.settings.backdrop != 'static' ) {
139
- this.$backdrop.click($.proxy(this.hide, this))
140
- }
141
-
142
- setTimeout(function () {
143
- that.$backdrop && that.$backdrop.addClass('in')
144
- $.support.transition && that.$backdrop.hasClass('fade') ?
145
- that.$backdrop.one(transitionEnd, callback) :
146
- callback()
147
- }, 0)
148
-
149
- } else if ( !this.isShown && this.$backdrop ) {
150
- this.$backdrop.removeClass('in')
151
-
152
- function removeElement() {
153
- that.$backdrop.remove()
154
- that.$backdrop = null
155
- }
156
-
157
- $.support.transition && this.$element.hasClass('fade')?
158
- this.$backdrop.one(transitionEnd, removeElement) :
159
- removeElement()
160
- } else if ( callback ) {
161
- callback()
162
- }
163
- }
164
-
165
- function escape() {
166
- var that = this
167
- if ( this.isShown && this.settings.keyboard ) {
168
- $('body').bind('keyup.modal', function ( e ) {
169
- if ( e.which == 27 ) {
170
- that.hide()
171
- }
172
- })
173
- } else if ( !this.isShown ) {
174
- $('body').unbind('keyup.modal')
175
- }
176
- }
177
-
178
-
179
- /* MODAL PLUGIN DEFINITION
180
- * ======================= */
181
-
182
- $.fn.modal = function ( options ) {
183
- var modal = this.data('modal')
184
-
185
- if (!modal) {
186
-
187
- if (typeof options == 'string') {
188
- options = {
189
- show: /show|toggle/.test(options)
190
- }
191
- }
192
-
193
- return this.each(function () {
194
- $(this).data('modal', new Modal(this, options))
195
- })
196
- }
197
-
198
- if ( options === true ) {
199
- return modal
200
- }
201
-
202
- if ( typeof options == 'string' ) {
203
- modal[options]()
204
- } else if ( modal ) {
205
- modal.toggle()
206
- }
207
-
208
- return this
209
- }
210
-
211
- $.fn.modal.Modal = Modal
212
-
213
- $.fn.modal.defaults = {
214
- backdrop: false
215
- , keyboard: false
216
- , show: true
217
- }
218
-
219
-
220
- /* MODAL DATA- IMPLEMENTATION
221
- * ========================== */
222
-
223
- $(document).ready(function () {
224
- $('body').delegate('[data-controls-modal]', 'click', function (e) {
225
- e.preventDefault()
226
- var $this = $(this).data('show', true)
227
- $('#' + $this.attr('data-controls-modal')).modal( $this.data() )
228
- })
229
- })
230
-
231
- }( window.jQuery || window.ender )
@@ -1,77 +0,0 @@
1
- /* ===========================================================
2
- * bootstrap-popover.js v1.3.0
3
- * http://twitter.github.com/bootstrap/javascript.html#popover
4
- * ===========================================================
5
- * Copyright 2011 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- * =========================================================== */
19
-
20
-
21
- !function( $ ) {
22
-
23
- var Popover = function ( element, options ) {
24
- this.$element = $(element)
25
- this.options = options
26
- this.enabled = true
27
- this.fixTitle()
28
- }
29
-
30
- /* NOTE: POPOVER EXTENDS BOOTSTRAP-TWIPSY.js
31
- ========================================= */
32
-
33
- Popover.prototype = $.extend({}, $.fn.twipsy.Twipsy.prototype, {
34
-
35
- setContent: function () {
36
- var $tip = this.tip()
37
- $tip.find('.title')[this.options.html ? 'html' : 'text'](this.getTitle())
38
- $tip.find('.content p')[this.options.html ? 'html' : 'text'](this.getContent())
39
- $tip[0].className = 'popover'
40
- }
41
-
42
- , getContent: function () {
43
- var contentvar
44
- , $e = this.$element
45
- , o = this.options
46
-
47
- if (typeof this.options.content == 'string') {
48
- content = $e.attr(o.content)
49
- } else if (typeof this.options.content == 'function') {
50
- content = this.options.content.call(this.$element[0])
51
- }
52
- return content
53
- }
54
-
55
- , tip: function() {
56
- if (!this.$tip) {
57
- this.$tip = $('<div class="popover" />')
58
- .html('<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>')
59
- }
60
- return this.$tip
61
- }
62
-
63
- })
64
-
65
-
66
- /* POPOVER PLUGIN DEFINITION
67
- * ======================= */
68
-
69
- $.fn.popover = function (options) {
70
- if (typeof options == 'object') options = $.extend({}, $.fn.popover.defaults, options)
71
- $.fn.twipsy.initWith.call(this, options, Popover, 'popover')
72
- return this
73
- }
74
-
75
- $.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, { content: 'data-content', placement: 'right'})
76
-
77
- }( window.jQuery || window.ender )