marley-jamaica 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/marley/client/jamaica.css +35 -14
- data/lib/marley/client/jamaica.js +9 -5
- data/lib/marley/client/reggae.js +1 -6
- metadata +3 -3
@@ -1,4 +1,36 @@
|
|
1
1
|
body {background: #C9DE96; color: #000; font:13px/1.231 sans-serif; *font-size:small;height: 100%; min-height: 100%;}
|
2
|
+
#main_menu__section {
|
3
|
+
background: #fff;
|
4
|
+
border: 1px solid #398235;
|
5
|
+
border-radius: 1em;
|
6
|
+
box-shadow: 0 0 10px rgba(51,51,51,0.5);
|
7
|
+
margin: 2em auto;
|
8
|
+
width: 90%;
|
9
|
+
height:90%;
|
10
|
+
position:relative;
|
11
|
+
}
|
12
|
+
#main_menu__section > .navigation {
|
13
|
+
display:block;
|
14
|
+
float:left;
|
15
|
+
width:20%;
|
16
|
+
height:85%;
|
17
|
+
overflow:auto;
|
18
|
+
text-align:center;
|
19
|
+
}
|
20
|
+
.navigation{
|
21
|
+
display:inline-block;
|
22
|
+
padding:.3em;
|
23
|
+
margin:0;
|
24
|
+
}
|
25
|
+
|
26
|
+
.content{
|
27
|
+
float:left;
|
28
|
+
width:75%;
|
29
|
+
height:85%;
|
30
|
+
overflow:auto;
|
31
|
+
margin:0 1em;
|
32
|
+
}
|
33
|
+
|
2
34
|
input, textarea {
|
3
35
|
border: 1px solid #398235;
|
4
36
|
line-height: 1.5em;
|
@@ -69,14 +101,6 @@ input[type=button]:hover,
|
|
69
101
|
cursor: pointer;
|
70
102
|
}
|
71
103
|
|
72
|
-
#main_menu__section {
|
73
|
-
background: #fff;
|
74
|
-
border: 1px solid #398235;
|
75
|
-
border-radius: 1em;
|
76
|
-
box-shadow: 0 0 10px rgba(51,51,51,0.5);
|
77
|
-
margin: 2em auto;
|
78
|
-
width: 90%;
|
79
|
-
}
|
80
104
|
h1{
|
81
105
|
background: #398235;
|
82
106
|
border-bottom: 1px solid #398235;
|
@@ -90,6 +114,7 @@ h1{
|
|
90
114
|
border-bottom-left-radius: 0;
|
91
115
|
border-bottom-right-radius: 0;
|
92
116
|
}
|
117
|
+
.navigation .navigation {padding:0;font-size:90%;}
|
93
118
|
.navigation h1 {
|
94
119
|
width:100%;
|
95
120
|
padding:0;
|
@@ -107,17 +132,13 @@ h1{
|
|
107
132
|
content: "\25BE";
|
108
133
|
}
|
109
134
|
.navigation li { list-style:none; margin: 1em 0; }
|
110
|
-
|
111
|
-
.navigation {min-width:20em;width:20%;padding:.3em;margin:0;display:inline-block;text-align:center;}
|
112
|
-
.navigation .navigation {padding:0;font-size:90%;}
|
113
|
-
.content{display:inline-block;width:60%;vertical-align:top;margin:0 1em;border:solid 1px;height:100%;border-radius:.5em;}
|
114
135
|
li.collapsed ul{display:none;}
|
115
136
|
|
116
137
|
.instanceContainer {
|
117
138
|
position:relative;
|
118
139
|
border: 1px solid #398235;
|
119
|
-
border-radius:
|
120
|
-
margin:
|
140
|
+
border-radius: .5em;
|
141
|
+
margin: .5em 0;
|
121
142
|
}
|
122
143
|
.instanceContainer .instanceContainer{margin:0 0 2em 2em;}
|
123
144
|
.colContainer div {
|
@@ -8,7 +8,13 @@ VALUE_INDEX=3;
|
|
8
8
|
String.prototype.humanize=function(){return pl.map(this.replace(/^_/,'').split('_'),function(w){return w[0].toUpperCase()+w.slice(1)}).join(' ');}
|
9
9
|
pl(function(){
|
10
10
|
r.call(_jamaica_json,'body');
|
11
|
-
pl('
|
11
|
+
pl('.content:empty').remove();
|
12
|
+
var contents=pl('.content');
|
13
|
+
if (contents.get().length===0){
|
14
|
+
pl('#main_menu__section').append('<div id="current_content" class="content active"></div>');
|
15
|
+
}else{
|
16
|
+
contents.appendTo('#main_menu__section');
|
17
|
+
}
|
12
18
|
pl.win_bind('form','submit',j.formSubmit);
|
13
19
|
pl.win_bind('.navigation li a','click',j.menuClick);
|
14
20
|
pl.win_bind('.navigation li h1','click',j.toggleNav);
|
@@ -22,7 +28,7 @@ j={
|
|
22
28
|
ajax_defaults:{
|
23
29
|
load:function(){pl('body').css('cursor','wait')},
|
24
30
|
always:function(){pl('body').css('cursor','default');},
|
25
|
-
success:function(json){r.call(json
|
31
|
+
success:function(json){pl(this).parent(2).replaceWith(r.call(json).toDom()); },
|
26
32
|
error:function(stat,json){
|
27
33
|
var err=JSON.parse(json);
|
28
34
|
var attrs=err[1];
|
@@ -45,9 +51,7 @@ j={
|
|
45
51
|
},
|
46
52
|
menuClick:function(e){
|
47
53
|
e.preventDefault();
|
48
|
-
|
49
|
-
var target='#current_content';
|
50
|
-
pl.ajax(j.make_ajax_params.call(this,{success:function(json){r.call(json,target)}}));
|
54
|
+
pl.ajax(j.make_ajax_params.call(this,{success:function(json){r.call(json,'#current_content')}}));
|
51
55
|
},
|
52
56
|
formSubmit:function(e){
|
53
57
|
e.preventDefault();
|
data/lib/marley/client/reggae.js
CHANGED
@@ -72,17 +72,12 @@ r.nodeTypes={
|
|
72
72
|
"section":function(m){
|
73
73
|
if (r.sectionTypes[m.attrs.name]){ return r.sectionTypes[m.attrs.name]};
|
74
74
|
var attrs=m.attrs;
|
75
|
-
//need to fix and use below
|
76
|
-
function get_nav(n){
|
77
|
-
return ["ul",{"class":"navigation"},
|
78
|
-
pl.map(attrs.navigation,function(i){return ["li",{},[i]]})];
|
79
|
-
}
|
80
75
|
var nav=pl.map(attrs.navigation,function(i){return ["li",{},[i]]});
|
81
76
|
return ["div",{"class":"section","id":attrs.name+"__section"},
|
82
77
|
[ ["h1",{},attrs.title],
|
83
78
|
["div",{"class":"menuDescription"},attrs.description],
|
84
79
|
["ul",{"class":"navigation"},nav],
|
85
|
-
|
80
|
+
["div",{"class":attrs.name+"__content content"},m.content]]
|
86
81
|
];
|
87
82
|
},
|
88
83
|
"instance":function(i) {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marley-jamaica
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Herb Daily
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-03-20 00:00:00 -03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.
|
23
|
+
version: 0.7.0
|
24
24
|
version:
|
25
25
|
description: A simple client for the Reggae data interchange format
|
26
26
|
email: herb.daily@safe-mail.net
|