File tree 8 files changed +132
-22
lines changed
8 files changed +132
-22
lines changed Original file line number Diff line number Diff line change
1
+ * 0.1.5
2
+ - 去除滚动条和箭头按钮,增加菜单栏
3
+
1
4
* 0.1.4
2
5
- 修复物料模式下的bug
3
6
- 增加表单/物料间切换的按钮
Original file line number Diff line number Diff line change @@ -102,36 +102,76 @@ body {
102
102
margin : 0 ;
103
103
padding : 0 ;
104
104
}
105
+ .main {
106
+ position : relative;
107
+ -webkit-transition : top .3s ;
108
+ top : 0 ;
109
+ }
105
110
.menu {
106
111
display : none;
107
112
position : fixed;
108
113
top : 10px ;
109
- right : -225px ;
110
- height : 25px ;
111
- width : 225px ;
112
- padding-left : 45px ;
113
- background : url(../ images/menu.png) no-repeat scroll 0 0 ;
114
- cursor : pointer;
114
+ right : -256px ;
115
+ width : 300px ;
115
116
-webkit-transition : all .3s ;
117
+ z-index : 10 ;
116
118
}
117
119
.menu : hover {
118
- right : 10px ;
120
+ right : 0 ;
121
+ }
122
+ .menu .arrow {
123
+ width : 45px ;
124
+ height : 34px ;
125
+ float : left;
126
+ background : url(../ images/menu.png) no-repeat scroll 10px 5px # eeeeee ;
127
+ box-shadow : 0px 0 4px 0 # cccccc ;
128
+ cursor : pointer;
119
129
}
120
130
.menu ul {
131
+ float : left;
121
132
margin : 0 ;
122
133
padding : 0 ;
123
134
list-style : none;
124
135
background-color : # eeeeee ;
136
+ box-shadow : 0px 0 4px 0 # cccccc ;
137
+ cursor : pointer;
138
+ opacity : 0.88 ;
125
139
}
126
140
.menu ul li {
127
- padding : 0 10px ;
141
+ position : relative;
142
+ width : 205px ;
143
+ padding : 10px 10px 10px 40px ;
128
144
text-align : center;
145
+ text-overflow : ellipsis;
146
+ overflow : hidden;
147
+ white-space : nowrap;
148
+ }
149
+ .menu ul li : first-of-type {
150
+ border-left : 3px solid # eee ;
151
+ margin-left : -3px ;
152
+ }
153
+ .menu ul li : hover {
154
+ background-color : # dddddd ;
155
+ }
156
+ .menu ul li .current {
157
+ background-color : # f7f7dd ;
158
+ color : black;
159
+ }
160
+ .menu ul li img {
161
+ max-height : 25px ;
162
+ max-width : 25px ;
163
+ position : absolute;
164
+ top : 0 ;
165
+ left : 10px ;
166
+ bottom : 0 ;
167
+ right : 0 ;
168
+ margin : auto 0 ;
129
169
}
130
170
.sdk-fieldset ,
131
171
.material-fieldset {
172
+ height : 580px ;
132
173
padding : 0 ;
133
174
margin : 0 ;
134
- margin-bottom : 5px ;
135
175
border : none;
136
176
}
137
177
.text-separate {
Original file line number Diff line number Diff line change @@ -119,40 +119,86 @@ body {
119
119
}
120
120
}
121
121
122
+ .main {
123
+ position : relative ;
124
+ -webkit-transition : top .3s ;
125
+ top : 0 ;
126
+ }
127
+
122
128
.menu {
123
129
display : none ;
124
130
position : fixed ;
125
131
top : 10px ;
126
- right : -225px ;
127
- height : 25px ;
128
- width : 225px ;
129
- padding-left : 45px ;
130
- background : url(../images/menu.png ) no-repeat scroll 0 0 ;
131
- cursor : pointer ;
132
+ right : -256px ;
133
+ width : 300px ;
132
134
-webkit-transition : all .3s ;
135
+ z-index : 10 ;
133
136
134
137
& :hover {
135
- right : 10px ;
138
+ right : 0 ;
139
+ }
140
+
141
+ .arrow {
142
+ width : 45px ;
143
+ height : 34px ;
144
+ float : left ;
145
+ background : url(../images/menu.png ) no-repeat scroll 10px 5px #eeeeee ;
146
+ box-shadow : 0px 0 4px 0 #cccccc ;
147
+ cursor : pointer ;
136
148
}
137
149
138
150
ul {
151
+ float : left ;
139
152
margin : 0 ;
140
153
padding : 0 ;
141
154
list-style : none ;
142
155
background-color : #eeeeee ;
156
+ box-shadow : 0px 0 4px 0 #cccccc ;
157
+ cursor : pointer ;
158
+ opacity : 0.88 ;
143
159
144
160
li {
145
- padding : 0 10px ;
161
+ position : relative ;
162
+ width : 205px ;
163
+ padding : 10px 10px 10px 40px ;
146
164
text-align : center ;
165
+ text-overflow : ellipsis ;
166
+ overflow : hidden ;
167
+ white-space : nowrap ;
168
+
169
+ & :first-of-type {
170
+ border-left : 3px solid #eee ;
171
+ margin-left : -3px ;
172
+ }
173
+
174
+ & :hover {
175
+ background-color : #dddddd ;
176
+ }
177
+
178
+ & .current {
179
+ background-color : #f7f7dd ;
180
+ color : black ;
181
+ }
182
+
183
+ img {
184
+ max-height : 25px ;
185
+ max-width : 25px ;
186
+ position : absolute ;
187
+ top : 0 ;
188
+ left : 10px ;
189
+ bottom : 0 ;
190
+ right : 0 ;
191
+ margin : auto 0 ;
192
+ }
147
193
}
148
194
}
149
195
}
150
196
151
197
.sdk-fieldset ,
152
198
.material-fieldset {
199
+ height : 580px ;
153
200
padding : 0 ;
154
201
margin : 0 ;
155
- margin-bottom : 5px ;
156
202
border : none ;
157
203
}
158
204
Original file line number Diff line number Diff line change
1
+ /**
2
+ * legoSdkTool
3
+ * @file tool.js
4
+ * @author chestnut
5
+ * @description 弹窗页的逻辑
6
+ */
7
+
1
8
var popup = { } ;
2
9
var MESSAGE = { } ;
3
10
@@ -166,15 +173,29 @@ function Popup() {
166
173
) ;
167
174
} ;
168
175
176
+ function _bindEvents ( ) {
177
+ $ ( '#menu' ) . on ( 'click' , 'li' , function ( e ) {
178
+ var li = $ ( e . currentTarget ) ;
179
+ var index = li . attr ( 'index' ) ;
180
+ $ ( '#main' ) . css ( 'top' , - 581 * index + 'px' ) ;
181
+ $ ( '#menu li.current' ) . removeClass ( 'current' ) ;
182
+ li . addClass ( 'current' ) ;
183
+ } ) ;
184
+ }
185
+
169
186
this . _initMenu = function ( datasource ) {
170
187
var tmpl = '' ;
171
188
$ . each ( datasource , function ( index , impl ) {
189
+ var className = index === 0 ? 'class="current"' : '' ;
190
+ var img = impl . screenshot ? '<img src="' + impl . screenshot + '" />' : '' ;
172
191
tmpl += ''
173
- + '<li index=' + index + '>'
192
+ + '<li index="' + index + '" ' + className + '>'
193
+ + img
174
194
+ ( impl . templateName || impl . mcid )
175
195
+ '</li>' ;
176
196
} ) ;
177
197
$ ( '#menu ul' ) . html ( tmpl ) . parent ( ) . show ( ) ;
198
+ _bindEvents ( ) ;
178
199
} ;
179
200
180
201
this . init = function ( ) {
@@ -394,8 +415,8 @@ function sdkPopup() {
394
415
else {
395
416
$ ( '#main' ) . hide ( ) ;
396
417
$ ( '#sdkNotFound' ) . show ( ) ;
397
- Helper . waiting ( false ) ;
398
418
}
419
+ Helper . waiting ( false ) ;
399
420
} ;
400
421
}
401
422
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " SDK TOOL" ,
3
- "version" : " 0.1.4 " ,
3
+ "version" : " 0.1.5 " ,
4
4
"icons" : {
5
5
"128" : " images/icon.png"
6
6
},
Original file line number Diff line number Diff line change 1
1
<?xml version =' 1.0' encoding =' UTF-8' ?>
2
2
<gupdate xmlns =' http://www.google.com/update2/response' protocol =' 2.0' >
3
3
<app appid =' kiapedlmjgmhomenpmjfnieiialeikkf' >
4
- <updatecheck codebase =' https://github.com/chestnutchen/legoSdkTool/raw/master/sdk.crx' version =' 0.1.4 ' />
4
+ <updatecheck codebase =' https://github.com/chestnutchen/legoSdkTool/raw/master/sdk.crx' version =' 0.1.5 ' />
5
5
</app >
6
6
</gupdate >
You can’t perform that action at this time.
0 commit comments