liquid_cms 0.2.0.11 → 0.2.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +7 -0
- data/TODO.rdoc +1 -1
- data/app/controllers/cms/main_controller.rb +3 -2
- data/app/helpers/cms/common_helper.rb +9 -2
- data/app/helpers/cms/components_helper.rb +10 -4
- data/app/models/cms/component.rb +4 -0
- data/app/views/cms/assets/_list.html.erb +4 -4
- data/app/views/cms/components/_list.html.erb +5 -1
- data/app/views/cms/pages/_list.html.erb +4 -4
- data/app/views/cms/shared/_sidebar.html.erb +32 -8
- data/app/views/layouts/cms.html.erb +5 -2
- data/generators/liquid_cms/templates/config/locales/cms/en.yml +3 -2
- data/generators/liquid_cms/templates/public/cms/codemirror/LICENSE +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/css/csscolors.css +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/css/docs.css +17 -3
- data/generators/liquid_cms/templates/public/cms/codemirror/css/font.js +15 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/css/jscolors.css +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/css/sparqlcolors.css +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/css/xmlcolors.css +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/js/codemirror.js +59 -26
- data/generators/liquid_cms/templates/public/cms/codemirror/js/editor.js +149 -71
- data/generators/liquid_cms/templates/public/cms/codemirror/js/highlight.js +2 -2
- data/generators/liquid_cms/templates/public/cms/codemirror/js/mirrorframe.js +2 -2
- data/generators/liquid_cms/templates/public/cms/codemirror/js/parsecss.js +5 -3
- data/generators/liquid_cms/templates/public/cms/codemirror/js/parsedummy.js +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/js/parsehtmlmixed.js +28 -9
- data/generators/liquid_cms/templates/public/cms/codemirror/js/parsejavascript.js +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/js/parsesparql.js +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/js/parsexml.js +6 -1
- data/generators/liquid_cms/templates/public/cms/codemirror/js/select.js +48 -21
- data/generators/liquid_cms/templates/public/cms/codemirror/js/stringstream.js +15 -1
- data/generators/liquid_cms/templates/public/cms/codemirror/js/tokenize.js +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/js/tokenizejavascript.js +1 -1
- data/generators/liquid_cms/templates/public/cms/codemirror/js/undo.js +17 -14
- data/generators/liquid_cms/templates/public/cms/codemirror/js/unittests.js +44 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/js/util.js +6 -3
- data/generators/liquid_cms/templates/public/cms/javascripts/cms.js +15 -1
- data/generators/liquid_cms/templates/public/cms/javascripts/livepipe.js +181 -0
- data/generators/liquid_cms/templates/public/cms/javascripts/tabs.js +149 -0
- data/generators/liquid_cms/templates/public/cms/stylesheets/ie9.css +4 -0
- data/generators/liquid_cms/templates/public/cms/stylesheets/sidebar.css +132 -0
- data/generators/liquid_cms/templates/public/cms/stylesheets/styles.css +1 -74
- data/generators/liquid_cms/templates/public/cms/stylesheets/themes/dark.css +2 -1
- data/lib/liquid_cms/context.rb +4 -0
- data/lib/liquid_cms/version.rb +1 -1
- data/liquid_cms.gemspec +1 -1
- data/test/functional/assets_controller_test.rb +3 -3
- data/test/rails_app/config/locales/cms/en.yml +8 -0
- metadata +11 -16
- data/generators/liquid_cms/templates/public/cms/codemirror/bigtest.html +0 -1296
- data/generators/liquid_cms/templates/public/cms/codemirror/css/people.jpg +0 -0
- data/generators/liquid_cms/templates/public/cms/codemirror/csstest.html +0 -60
- data/generators/liquid_cms/templates/public/cms/codemirror/highlight.html +0 -82
- data/generators/liquid_cms/templates/public/cms/codemirror/htmltest.html +0 -52
- data/generators/liquid_cms/templates/public/cms/codemirror/index.html +0 -245
- data/generators/liquid_cms/templates/public/cms/codemirror/jstest.html +0 -56
- data/generators/liquid_cms/templates/public/cms/codemirror/manual.html +0 -759
- data/generators/liquid_cms/templates/public/cms/codemirror/mixedtest.html +0 -52
- data/generators/liquid_cms/templates/public/cms/codemirror/sparqltest.html +0 -41
- data/generators/liquid_cms/templates/public/cms/codemirror/story.html +0 -671
@@ -0,0 +1,44 @@
|
|
1
|
+
/**
|
2
|
+
* Test Harness for CodeMirror
|
3
|
+
* JS-unit compatible tests here. The two available assertions are
|
4
|
+
* assertEquals (strict equality) and assertEquivalent (looser equivalency).
|
5
|
+
*
|
6
|
+
* 'editor' is a global object for the CodeMirror editor shared between all
|
7
|
+
* tests. After manipulating it in each test, try to restore it to
|
8
|
+
* approximately its original state.
|
9
|
+
*/
|
10
|
+
|
11
|
+
function testSetGet() {
|
12
|
+
var code = 'It was the best of times.\nIt was the worst of times.';
|
13
|
+
editor.setCode(code);
|
14
|
+
assertEquals(code, editor.getCode());
|
15
|
+
editor.setCode('');
|
16
|
+
assertEquals('', editor.getCode());
|
17
|
+
}
|
18
|
+
|
19
|
+
function testSetStylesheet() {
|
20
|
+
function cssStatus() {
|
21
|
+
// Returns a list of tuples, for each CSS link return the filename and
|
22
|
+
// whether it is enabled.
|
23
|
+
links = editor.win.document.getElementsByTagName('link');
|
24
|
+
css = [];
|
25
|
+
for (var x = 0, link; link = links[x]; x++) {
|
26
|
+
if (link.rel.indexOf("stylesheet") !== -1) {
|
27
|
+
css.push([link.href.substring(link.href.lastIndexOf('/') + 1),
|
28
|
+
!link.disabled])
|
29
|
+
}
|
30
|
+
}
|
31
|
+
return css;
|
32
|
+
}
|
33
|
+
assertEquivalent([], cssStatus());
|
34
|
+
editor.setStylesheet('css/jscolors.css');
|
35
|
+
assertEquivalent([['jscolors.css', true]], cssStatus());
|
36
|
+
editor.setStylesheet(['css/csscolors.css', 'css/xmlcolors.css']);
|
37
|
+
assertEquivalent([['jscolors.css', false], ['csscolors.css', true], ['xmlcolors.css', true]], cssStatus());
|
38
|
+
editor.setStylesheet([]);
|
39
|
+
assertEquivalent([['jscolors.css', false], ['csscolors.css', false], ['xmlcolors.css', false]], cssStatus());
|
40
|
+
}
|
41
|
+
|
42
|
+
// Update this list of tests as new ones are added.
|
43
|
+
var tests = ['testSetGet', 'testSetStylesheet'];
|
44
|
+
|
@@ -34,12 +34,15 @@ function matcher(regexp){
|
|
34
34
|
return function(value){return regexp.test(value);};
|
35
35
|
}
|
36
36
|
|
37
|
-
// Test whether a DOM node has a certain CSS class.
|
38
|
-
|
39
|
-
function hasClass(element, className){
|
37
|
+
// Test whether a DOM node has a certain CSS class.
|
38
|
+
function hasClass(element, className) {
|
40
39
|
var classes = element.className;
|
41
40
|
return classes && new RegExp("(^| )" + className + "($| )").test(classes);
|
42
41
|
}
|
42
|
+
function removeClass(element, className) {
|
43
|
+
element.className = element.className.replace(new RegExp(" " + className + "\\b", "g"), "");
|
44
|
+
return element;
|
45
|
+
}
|
43
46
|
|
44
47
|
// Insert a DOM node after another node.
|
45
48
|
function insertAfter(newNode, oldNode) {
|
@@ -1,5 +1,19 @@
|
|
1
|
+
// set or delete a cookie value to remember the folders view state
|
2
|
+
function set_component_view_state(elem) {
|
3
|
+
var key = elem.getAttribute('id');
|
4
|
+
var current_folders = jar.get('component_folders') || {};
|
5
|
+
|
6
|
+
if (elem.next('ul').visible())
|
7
|
+
current_folders[key] = true;
|
8
|
+
else
|
9
|
+
delete current_folders[key];
|
10
|
+
|
11
|
+
jar.put('component_folders', current_folders);
|
12
|
+
}
|
13
|
+
|
1
14
|
function toggle_component() {
|
2
15
|
$(this).next('ul').toggle();
|
16
|
+
set_component_view_state(this);
|
3
17
|
}
|
4
18
|
|
5
19
|
function asset_preview_toggle() {
|
@@ -17,5 +31,5 @@ $(document).observe('dom:loaded', function() {
|
|
17
31
|
});
|
18
32
|
});
|
19
33
|
|
20
|
-
var cookie_expiry = 60 * 60 * 24 * 30; //
|
34
|
+
var cookie_expiry = 60 * 60 * 24 * 30 * 3; // 3 months
|
21
35
|
var jar = new CookieJar({expires:cookie_expiry, path:'/cms'});
|
@@ -0,0 +1,181 @@
|
|
1
|
+
/**
|
2
|
+
* @author Ryan Johnson <http://syntacticx.com/>
|
3
|
+
* @copyright 2008 PersonalGrid Corporation <http://personalgrid.com/>
|
4
|
+
* @package LivePipe UI
|
5
|
+
* @license MIT
|
6
|
+
* @url http://livepipe.net/core
|
7
|
+
* @require prototype.js
|
8
|
+
*/
|
9
|
+
|
10
|
+
if(typeof(Control) == 'undefined')
|
11
|
+
Control = {};
|
12
|
+
|
13
|
+
var $proc = function(proc){
|
14
|
+
return typeof(proc) == 'function' ? proc : function(){return proc};
|
15
|
+
};
|
16
|
+
|
17
|
+
var $value = function(value){
|
18
|
+
return typeof(value) == 'function' ? value() : value;
|
19
|
+
};
|
20
|
+
|
21
|
+
Object.Event = {
|
22
|
+
extend: function(object){
|
23
|
+
object._objectEventSetup = function(event_name){
|
24
|
+
this._observers = this._observers || {};
|
25
|
+
this._observers[event_name] = this._observers[event_name] || [];
|
26
|
+
};
|
27
|
+
object.observe = function(event_name,observer){
|
28
|
+
if(typeof(event_name) == 'string' && typeof(observer) != 'undefined'){
|
29
|
+
this._objectEventSetup(event_name);
|
30
|
+
if(!this._observers[event_name].include(observer))
|
31
|
+
this._observers[event_name].push(observer);
|
32
|
+
}else
|
33
|
+
for(var e in event_name)
|
34
|
+
this.observe(e,event_name[e]);
|
35
|
+
};
|
36
|
+
object.stopObserving = function(event_name,observer){
|
37
|
+
this._objectEventSetup(event_name);
|
38
|
+
if(event_name && observer)
|
39
|
+
this._observers[event_name] = this._observers[event_name].without(observer);
|
40
|
+
else if(event_name)
|
41
|
+
this._observers[event_name] = [];
|
42
|
+
else
|
43
|
+
this._observers = {};
|
44
|
+
};
|
45
|
+
object.observeOnce = function(event_name,outer_observer){
|
46
|
+
var inner_observer = function(){
|
47
|
+
outer_observer.apply(this,arguments);
|
48
|
+
this.stopObserving(event_name,inner_observer);
|
49
|
+
}.bind(this);
|
50
|
+
this._objectEventSetup(event_name);
|
51
|
+
this._observers[event_name].push(inner_observer);
|
52
|
+
};
|
53
|
+
object.notify = function(event_name){
|
54
|
+
this._objectEventSetup(event_name);
|
55
|
+
var collected_return_values = [];
|
56
|
+
var args = $A(arguments).slice(1);
|
57
|
+
try{
|
58
|
+
for(var i = 0; i < this._observers[event_name].length; ++i)
|
59
|
+
collected_return_values.push(this._observers[event_name][i].apply(this._observers[event_name][i],args) || null);
|
60
|
+
}catch(e){
|
61
|
+
if(e == $break)
|
62
|
+
return false;
|
63
|
+
else
|
64
|
+
throw e;
|
65
|
+
}
|
66
|
+
return collected_return_values;
|
67
|
+
};
|
68
|
+
if(object.prototype){
|
69
|
+
object.prototype._objectEventSetup = object._objectEventSetup;
|
70
|
+
object.prototype.observe = object.observe;
|
71
|
+
object.prototype.stopObserving = object.stopObserving;
|
72
|
+
object.prototype.observeOnce = object.observeOnce;
|
73
|
+
object.prototype.notify = function(event_name){
|
74
|
+
if(object.notify){
|
75
|
+
var args = $A(arguments).slice(1);
|
76
|
+
args.unshift(this);
|
77
|
+
args.unshift(event_name);
|
78
|
+
object.notify.apply(object,args);
|
79
|
+
}
|
80
|
+
this._objectEventSetup(event_name);
|
81
|
+
var args = $A(arguments).slice(1);
|
82
|
+
var collected_return_values = [];
|
83
|
+
try{
|
84
|
+
if(this.options && this.options[event_name] && typeof(this.options[event_name]) == 'function')
|
85
|
+
collected_return_values.push(this.options[event_name].apply(this,args) || null);
|
86
|
+
var callbacks_copy = this._observers[event_name]; // since original array will be modified after observeOnce calls
|
87
|
+
for(var i = 0; i < callbacks_copy.length; ++i)
|
88
|
+
collected_return_values.push(callbacks_copy[i].apply(callbacks_copy[i],args) || null);
|
89
|
+
}catch(e){
|
90
|
+
if(e == $break)
|
91
|
+
return false;
|
92
|
+
else
|
93
|
+
throw e;
|
94
|
+
}
|
95
|
+
return collected_return_values;
|
96
|
+
};
|
97
|
+
}
|
98
|
+
}
|
99
|
+
};
|
100
|
+
|
101
|
+
/* Begin Core Extensions */
|
102
|
+
|
103
|
+
//Element.observeOnce
|
104
|
+
Element.addMethods({
|
105
|
+
observeOnce: function(element,event_name,outer_callback){
|
106
|
+
var inner_callback = function(){
|
107
|
+
outer_callback.apply(this,arguments);
|
108
|
+
Element.stopObserving(element,event_name,inner_callback);
|
109
|
+
};
|
110
|
+
Element.observe(element,event_name,inner_callback);
|
111
|
+
}
|
112
|
+
});
|
113
|
+
|
114
|
+
//mouse:wheel
|
115
|
+
(function(){
|
116
|
+
function wheel(event){
|
117
|
+
var delta, element, custom_event;
|
118
|
+
// normalize the delta
|
119
|
+
if (event.wheelDelta) { // IE & Opera
|
120
|
+
delta = event.wheelDelta / 120;
|
121
|
+
} else if (event.detail) { // W3C
|
122
|
+
delta =- event.detail / 3;
|
123
|
+
}
|
124
|
+
if (!delta) { return; }
|
125
|
+
element = Event.extend(event).target;
|
126
|
+
element = Element.extend(element.nodeType === Node.TEXT_NODE ? element.parentNode : element);
|
127
|
+
custom_event = element.fire('mouse:wheel',{ delta: delta });
|
128
|
+
if (custom_event.stopped) {
|
129
|
+
Event.stop(event);
|
130
|
+
return false;
|
131
|
+
}
|
132
|
+
}
|
133
|
+
document.observe('mousewheel',wheel);
|
134
|
+
document.observe('DOMMouseScroll',wheel);
|
135
|
+
})();
|
136
|
+
|
137
|
+
/* End Core Extensions */
|
138
|
+
|
139
|
+
//from PrototypeUI
|
140
|
+
var IframeShim = Class.create({
|
141
|
+
initialize: function() {
|
142
|
+
this.element = new Element('iframe',{
|
143
|
+
style: 'position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);display:none',
|
144
|
+
src: 'javascript:void(0);',
|
145
|
+
frameborder: 0
|
146
|
+
});
|
147
|
+
$(document.body).insert(this.element);
|
148
|
+
},
|
149
|
+
hide: function() {
|
150
|
+
this.element.hide();
|
151
|
+
return this;
|
152
|
+
},
|
153
|
+
show: function() {
|
154
|
+
this.element.show();
|
155
|
+
return this;
|
156
|
+
},
|
157
|
+
positionUnder: function(element) {
|
158
|
+
var element = $(element);
|
159
|
+
var offset = element.cumulativeOffset();
|
160
|
+
var dimensions = element.getDimensions();
|
161
|
+
this.element.setStyle({
|
162
|
+
left: offset[0] + 'px',
|
163
|
+
top: offset[1] + 'px',
|
164
|
+
width: dimensions.width + 'px',
|
165
|
+
height: dimensions.height + 'px',
|
166
|
+
zIndex: element.getStyle('zIndex') - 1
|
167
|
+
}).show();
|
168
|
+
return this;
|
169
|
+
},
|
170
|
+
setBounds: function(bounds) {
|
171
|
+
for(prop in bounds)
|
172
|
+
bounds[prop] += 'px';
|
173
|
+
this.element.setStyle(bounds);
|
174
|
+
return this;
|
175
|
+
},
|
176
|
+
destroy: function() {
|
177
|
+
if(this.element)
|
178
|
+
this.element.remove();
|
179
|
+
return this;
|
180
|
+
}
|
181
|
+
});
|
@@ -0,0 +1,149 @@
|
|
1
|
+
/**
|
2
|
+
* @author Ryan Johnson <http://syntacticx.com/>
|
3
|
+
* @copyright 2008 PersonalGrid Corporation <http://personalgrid.com/>
|
4
|
+
* @package LivePipe UI
|
5
|
+
* @license MIT
|
6
|
+
* @url http://livepipe.net/control/tabs
|
7
|
+
* @require prototype.js, livepipe.js
|
8
|
+
*/
|
9
|
+
|
10
|
+
/*global window, document, Prototype, $, $A, $H, $break, Class, Element, Event, Control */
|
11
|
+
|
12
|
+
if(typeof(Prototype) == "undefined") {
|
13
|
+
throw "Control.Tabs requires Prototype to be loaded."; }
|
14
|
+
if(typeof(Object.Event) == "undefined") {
|
15
|
+
throw "Control.Tabs requires Object.Event to be loaded."; }
|
16
|
+
|
17
|
+
Control.Tabs = Class.create({
|
18
|
+
initialize: function(tab_list_container,options){
|
19
|
+
if(!$(tab_list_container)) {
|
20
|
+
throw "Control.Tabs could not find the element: " + tab_list_container; }
|
21
|
+
this.activeContainer = false;
|
22
|
+
this.activeLink = false;
|
23
|
+
this.containers = $H({});
|
24
|
+
this.links = [];
|
25
|
+
Control.Tabs.instances.push(this);
|
26
|
+
this.options = {
|
27
|
+
beforeChange: Prototype.emptyFunction,
|
28
|
+
afterChange: Prototype.emptyFunction,
|
29
|
+
hover: false,
|
30
|
+
linkSelector: 'li a',
|
31
|
+
setClassOnContainer: false,
|
32
|
+
activeClassName: 'active',
|
33
|
+
defaultTab: 'first',
|
34
|
+
autoLinkExternal: true,
|
35
|
+
targetRegExp: /#(.+)$/,
|
36
|
+
showFunction: Element.show,
|
37
|
+
hideFunction: Element.hide
|
38
|
+
};
|
39
|
+
Object.extend(this.options,options || {});
|
40
|
+
(typeof(this.options.linkSelector == 'string') ?
|
41
|
+
$(tab_list_container).select(this.options.linkSelector) :
|
42
|
+
this.options.linkSelector($(tab_list_container))
|
43
|
+
).findAll(function(link){
|
44
|
+
return (/^#/).exec((Prototype.Browser.WebKit ? decodeURIComponent(link.href) : link.href).replace(window.location.href.split('#')[0],''));
|
45
|
+
}).each(function(link){
|
46
|
+
this.addTab(link);
|
47
|
+
}.bind(this));
|
48
|
+
this.containers.values().each(Element.hide);
|
49
|
+
if(this.options.defaultTab == 'first') {
|
50
|
+
this.setActiveTab(this.links.first());
|
51
|
+
} else if(this.options.defaultTab == 'last') {
|
52
|
+
this.setActiveTab(this.links.last());
|
53
|
+
} else {
|
54
|
+
this.setActiveTab(this.options.defaultTab); }
|
55
|
+
var targets = this.options.targetRegExp.exec(window.location);
|
56
|
+
if(targets && targets[1]){
|
57
|
+
targets[1].split(',').each(function(target){
|
58
|
+
this.setActiveTab(this.links.find(function(link){
|
59
|
+
return link.key == target;
|
60
|
+
}));
|
61
|
+
}.bind(this));
|
62
|
+
}
|
63
|
+
if(this.options.autoLinkExternal){
|
64
|
+
$A(document.getElementsByTagName('a')).each(function(a){
|
65
|
+
if(!this.links.include(a)){
|
66
|
+
var clean_href = a.href.replace(window.location.href.split('#')[0],'');
|
67
|
+
if(clean_href.substring(0,1) == '#'){
|
68
|
+
if(this.containers.keys().include(clean_href.substring(1))){
|
69
|
+
$(a).observe('click',function(event,clean_href){
|
70
|
+
this.setActiveTab(clean_href.substring(1));
|
71
|
+
}.bindAsEventListener(this,clean_href));
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}.bind(this));
|
76
|
+
}
|
77
|
+
},
|
78
|
+
addTab: function(link){
|
79
|
+
this.links.push(link);
|
80
|
+
link.key = link.getAttribute('href').replace(window.location.href.split('#')[0],'').split('#').last().replace(/#/,'');
|
81
|
+
var container = $(link.key);
|
82
|
+
if(!container) {
|
83
|
+
throw "Control.Tabs: #" + link.key + " was not found on the page."; }
|
84
|
+
this.containers.set(link.key,container);
|
85
|
+
link[this.options.hover ? 'onmouseover' : 'onclick'] = function(link){
|
86
|
+
if(window.event) {
|
87
|
+
Event.stop(window.event); }
|
88
|
+
this.setActiveTab(link);
|
89
|
+
return false;
|
90
|
+
}.bind(this,link);
|
91
|
+
},
|
92
|
+
setActiveTab: function(link){
|
93
|
+
if(!link && typeof(link) == 'undefined') {
|
94
|
+
return; }
|
95
|
+
if(typeof(link) == 'string'){
|
96
|
+
this.setActiveTab(this.links.find(function(_link){
|
97
|
+
return _link.key == link;
|
98
|
+
}));
|
99
|
+
}else if(typeof(link) == 'number'){
|
100
|
+
this.setActiveTab(this.links[link]);
|
101
|
+
}else{
|
102
|
+
if(this.notify('beforeChange',this.activeContainer,this.containers.get(link.key)) === false) {
|
103
|
+
return; }
|
104
|
+
if(this.activeContainer) {
|
105
|
+
this.options.hideFunction(this.activeContainer); }
|
106
|
+
this.links.each(function(item){
|
107
|
+
(this.options.setClassOnContainer ? $(item.parentNode) : item).removeClassName(this.options.activeClassName);
|
108
|
+
}.bind(this));
|
109
|
+
(this.options.setClassOnContainer ? $(link.parentNode) : link).addClassName(this.options.activeClassName);
|
110
|
+
this.activeContainer = this.containers.get(link.key);
|
111
|
+
this.activeLink = link;
|
112
|
+
this.options.showFunction(this.containers.get(link.key));
|
113
|
+
this.notify('afterChange',this.containers.get(link.key));
|
114
|
+
}
|
115
|
+
},
|
116
|
+
next: function(){
|
117
|
+
this.links.each(function(link,i){
|
118
|
+
if(this.activeLink == link && this.links[i + 1]){
|
119
|
+
this.setActiveTab(this.links[i + 1]);
|
120
|
+
throw $break;
|
121
|
+
}
|
122
|
+
}.bind(this));
|
123
|
+
},
|
124
|
+
previous: function(){
|
125
|
+
this.links.each(function(link,i){
|
126
|
+
if(this.activeLink == link && this.links[i - 1]){
|
127
|
+
this.setActiveTab(this.links[i - 1]);
|
128
|
+
throw $break;
|
129
|
+
}
|
130
|
+
}.bind(this));
|
131
|
+
},
|
132
|
+
first: function(){
|
133
|
+
this.setActiveTab(this.links.first());
|
134
|
+
},
|
135
|
+
last: function(){
|
136
|
+
this.setActiveTab(this.links.last());
|
137
|
+
}
|
138
|
+
});
|
139
|
+
Object.extend(Control.Tabs,{
|
140
|
+
instances: [],
|
141
|
+
findByTabId: function(id){
|
142
|
+
return Control.Tabs.instances.find(function(tab){
|
143
|
+
return tab.links.find(function(link){
|
144
|
+
return link.key == id;
|
145
|
+
});
|
146
|
+
});
|
147
|
+
}
|
148
|
+
});
|
149
|
+
Object.Event.extend(Control.Tabs);
|
@@ -0,0 +1,132 @@
|
|
1
|
+
#sidebar {
|
2
|
+
background-color: #CFCFCF;
|
3
|
+
float: left;
|
4
|
+
padding: 0 0.5em 0.5em;
|
5
|
+
margin-left: 1em;
|
6
|
+
width: 19em;
|
7
|
+
}
|
8
|
+
#sidebar h2 {
|
9
|
+
font-size: 12pt;
|
10
|
+
padding: 0.2em;
|
11
|
+
margin: 0;
|
12
|
+
text-align: center;
|
13
|
+
}
|
14
|
+
#sidebar form {
|
15
|
+
margin-top: 0.5em;
|
16
|
+
}
|
17
|
+
#sidebar ul {
|
18
|
+
list-style-type: none;
|
19
|
+
margin: 0;
|
20
|
+
padding: 0;
|
21
|
+
}
|
22
|
+
#sidebar #assets li {
|
23
|
+
border: 1px solid #AAA;
|
24
|
+
padding: 0.3em 0.4em;
|
25
|
+
margin-bottom: 0.3em;
|
26
|
+
}
|
27
|
+
#sidebar #assets li:hover {
|
28
|
+
background-color: #BFD6FF !important;
|
29
|
+
}
|
30
|
+
#sidebar #assets li.light {
|
31
|
+
background-color: #DDD;
|
32
|
+
}
|
33
|
+
#sidebar .asset_details {
|
34
|
+
margin-top: 0.5em;
|
35
|
+
}
|
36
|
+
#sidebar .asset_image {
|
37
|
+
margin: 0 1.5em 0;
|
38
|
+
}
|
39
|
+
#sidebar .asset_image {
|
40
|
+
float: left;
|
41
|
+
}
|
42
|
+
#sidebar .asset_size {
|
43
|
+
font-size: 8pt;
|
44
|
+
float: right;
|
45
|
+
}
|
46
|
+
#sidebar #components form {
|
47
|
+
margin-bottom: 0.5em;
|
48
|
+
}
|
49
|
+
#sidebar #components ul ul {
|
50
|
+
margin-left: 0.5em;
|
51
|
+
}
|
52
|
+
#sidebar .documentation {
|
53
|
+
text-align: center;
|
54
|
+
margin-bottom: 0;
|
55
|
+
}
|
56
|
+
|
57
|
+
#sidebar ul.tabs {
|
58
|
+
display: block;
|
59
|
+
margin: 1em 0 0.5em 0;
|
60
|
+
padding: 0;
|
61
|
+
text-align: center;
|
62
|
+
}
|
63
|
+
#sidebar ul.tabs li {
|
64
|
+
display: inline;
|
65
|
+
}
|
66
|
+
#sidebar ul.tabs a {
|
67
|
+
-moz-border-radius: 0.4em 0.4em 0 0;
|
68
|
+
-webkit-border-radius: 0.4em 0.4em 0 0;
|
69
|
+
border-radius: 0.4em 0.4em 0 0;
|
70
|
+
background-color: #333;
|
71
|
+
color: #CCC;
|
72
|
+
font-size: 9pt;
|
73
|
+
font-weight: bold;
|
74
|
+
margin: 0;
|
75
|
+
padding: 0.5em 0.5em;
|
76
|
+
padding-right: 0.5em;
|
77
|
+
text-align: center;
|
78
|
+
text-shadow: -1px -1px 1px #000000;
|
79
|
+
text-decoration: none;
|
80
|
+
}
|
81
|
+
#sidebar ul.tabs a.active,
|
82
|
+
#sidebar ul.tabs a:hover {
|
83
|
+
text-shadow: none;
|
84
|
+
}
|
85
|
+
#sidebar ul.tabs a:hover {
|
86
|
+
background-color: #777;
|
87
|
+
}
|
88
|
+
#sidebar ul.tabs a.active {
|
89
|
+
background-color: #666;
|
90
|
+
}
|
91
|
+
|
92
|
+
#tab_container {
|
93
|
+
border: 2px groove #CCC;
|
94
|
+
padding: 0.2em 0.5em;
|
95
|
+
}
|
96
|
+
#tab_container p {
|
97
|
+
background: none repeat scroll 0 0 #E5E5E5;
|
98
|
+
font-size: 8pt;
|
99
|
+
margin: 0 0 0.5em;
|
100
|
+
padding: 0.5em 0;
|
101
|
+
text-align: center;
|
102
|
+
}
|
103
|
+
#tab_container p:first-child {
|
104
|
+
background: #777;
|
105
|
+
background: -moz-linear-gradient(270deg, #666 0%, #888 100%) repeat scroll 0 0 transparent;
|
106
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0,#666), color-stop(1.0,#888));
|
107
|
+
}
|
108
|
+
#tab_container p:first-child a {
|
109
|
+
color: #EEE;
|
110
|
+
font-weight: bold;
|
111
|
+
text-decoration: none;
|
112
|
+
text-shadow: -1px -1px 1px #333;
|
113
|
+
}
|
114
|
+
#tab_container p:first-child a:hover {
|
115
|
+
text-decoration: underline;
|
116
|
+
}
|
117
|
+
|
118
|
+
#cms ul.tree { list-style-type: none; background: url(/cms/images/tree/vline.png) repeat-y; margin: 0; padding: 0; }
|
119
|
+
#cms ul.tree ul { margin-left: 10px; }
|
120
|
+
#cms ul.tree li { margin: 0; padding: 0 0px 0 12px; line-height: 20px; background: url(/cms/images/tree/node.png) no-repeat; color: #369; font-weight: bold; }
|
121
|
+
#cms ul.tree li:last-child { background: url(/cms/images/tree/lastnode.png) no-repeat; }
|
122
|
+
|
123
|
+
#cms ul.tree, #sidebar #assets ul {
|
124
|
+
margin-bottom: 0.5em;
|
125
|
+
}
|
126
|
+
#cms ul.tree ul {
|
127
|
+
margin-left: 15px;
|
128
|
+
}
|
129
|
+
#cms ul.tree li img.folder:hover {
|
130
|
+
cursor: pointer;
|
131
|
+
}
|
132
|
+
|