@@ -156,28 +156,24 @@ $(function() {
156
156
$el . addClass ( 'visible' ) ;
157
157
} , 1000 ) ;
158
158
} )
159
- //LoginForm validation
159
+ //ResetForm validation
160
160
$ ( function ( ) {
161
- if ( ! $ ( '#login -form' ) . length ) {
161
+ if ( ! $ ( '#reset -form' ) . length ) {
162
162
return false ;
163
163
}
164
164
165
- var loginValidationSettings = {
165
+ var resetValidationSettings = {
166
166
rules : {
167
- username : {
167
+ email1 : {
168
168
required : true ,
169
169
email : true
170
- } ,
171
- password : "required" ,
172
- agree : "required"
170
+ }
173
171
} ,
174
172
messages : {
175
- username : {
176
- required : "Please enter username " ,
173
+ email1 : {
174
+ required : "Please enter email address " ,
177
175
email : "Please enter a valid email address"
178
- } ,
179
- password : "Please enter password" ,
180
- agree : "Please accept our policy"
176
+ }
181
177
} ,
182
178
invalidHandler : function ( ) {
183
179
animate ( {
@@ -187,28 +183,32 @@ $(function() {
187
183
}
188
184
}
189
185
190
- $ . extend ( loginValidationSettings , config . validations ) ;
186
+ $ . extend ( resetValidationSettings , config . validations ) ;
191
187
192
- $ ( '#login -form' ) . validate ( loginValidationSettings ) ;
188
+ $ ( '#reset -form' ) . validate ( resetValidationSettings ) ;
193
189
} )
194
- //ResetForm validation
190
+ //LoginForm validation
195
191
$ ( function ( ) {
196
- if ( ! $ ( '#reset -form' ) . length ) {
192
+ if ( ! $ ( '#login -form' ) . length ) {
197
193
return false ;
198
194
}
199
195
200
- var resetValidationSettings = {
196
+ var loginValidationSettings = {
201
197
rules : {
202
- email1 : {
198
+ username : {
203
199
required : true ,
204
200
email : true
205
- }
201
+ } ,
202
+ password : "required" ,
203
+ agree : "required"
206
204
} ,
207
205
messages : {
208
- email1 : {
209
- required : "Please enter email address " ,
206
+ username : {
207
+ required : "Please enter username " ,
210
208
email : "Please enter a valid email address"
211
- }
209
+ } ,
210
+ password : "Please enter password" ,
211
+ agree : "Please accept our policy"
212
212
} ,
213
213
invalidHandler : function ( ) {
214
214
animate ( {
@@ -218,9 +218,9 @@ $(function() {
218
218
}
219
219
}
220
220
221
- $ . extend ( resetValidationSettings , config . validations ) ;
221
+ $ . extend ( loginValidationSettings , config . validations ) ;
222
222
223
- $ ( '#reset -form' ) . validate ( resetValidationSettings ) ;
223
+ $ ( '#login -form' ) . validate ( loginValidationSettings ) ;
224
224
} )
225
225
//SignupForm validation
226
226
$ ( function ( ) {
@@ -984,6 +984,47 @@ $(function() {
984
984
985
985
986
986
987
+ $ ( function ( ) {
988
+
989
+
990
+ function drawDashboardItemsListSparklines ( ) {
991
+ $ ( ".dashboard-page .items .sparkline" ) . each ( function ( ) {
992
+ var type = $ ( this ) . data ( 'type' ) ;
993
+
994
+ // There is predefined data
995
+ if ( $ ( this ) . data ( 'data' ) ) {
996
+ var data = $ ( this ) . data ( 'data' ) . split ( ',' ) . map ( function ( item ) {
997
+ if ( item . indexOf ( ":" ) > 0 ) {
998
+ return item . split ( ":" ) ;
999
+ }
1000
+ else {
1001
+ return item ;
1002
+ }
1003
+ } ) ;
1004
+ }
1005
+ // Generate random data
1006
+ else {
1007
+ var data = [ ] ;
1008
+ for ( var i = 0 ; i < 17 ; i ++ ) {
1009
+ data . push ( Math . round ( 100 * Math . random ( ) ) ) ;
1010
+ }
1011
+ }
1012
+
1013
+
1014
+ $ ( this ) . sparkline ( data , {
1015
+ barColor : config . chart . colorPrimary . toString ( ) ,
1016
+ height : $ ( this ) . height ( ) ,
1017
+ type : type
1018
+ } ) ;
1019
+ } ) ;
1020
+ }
1021
+
1022
+ drawDashboardItemsListSparklines ( ) ;
1023
+
1024
+ $ ( document ) . on ( "themechange" , function ( ) {
1025
+ drawDashboardItemsListSparklines ( ) ;
1026
+ } ) ;
1027
+ } ) ;
987
1028
$ ( function ( ) {
988
1029
989
1030
var $dashboardSalesBreakdownChart = $ ( '#dashboard-sales-breakdown-chart' ) ;
@@ -1071,47 +1112,6 @@ $(function() {
1071
1112
drawSalesMap ( ) ;
1072
1113
} ) ;
1073
1114
} ) ;
1074
- $ ( function ( ) {
1075
-
1076
-
1077
- function drawDashboardItemsListSparklines ( ) {
1078
- $ ( ".dashboard-page .items .sparkline" ) . each ( function ( ) {
1079
- var type = $ ( this ) . data ( 'type' ) ;
1080
-
1081
- // There is predefined data
1082
- if ( $ ( this ) . data ( 'data' ) ) {
1083
- var data = $ ( this ) . data ( 'data' ) . split ( ',' ) . map ( function ( item ) {
1084
- if ( item . indexOf ( ":" ) > 0 ) {
1085
- return item . split ( ":" ) ;
1086
- }
1087
- else {
1088
- return item ;
1089
- }
1090
- } ) ;
1091
- }
1092
- // Generate random data
1093
- else {
1094
- var data = [ ] ;
1095
- for ( var i = 0 ; i < 17 ; i ++ ) {
1096
- data . push ( Math . round ( 100 * Math . random ( ) ) ) ;
1097
- }
1098
- }
1099
-
1100
-
1101
- $ ( this ) . sparkline ( data , {
1102
- barColor : config . chart . colorPrimary . toString ( ) ,
1103
- height : $ ( this ) . height ( ) ,
1104
- type : type
1105
- } ) ;
1106
- } ) ;
1107
- }
1108
-
1109
- drawDashboardItemsListSparklines ( ) ;
1110
-
1111
- $ ( document ) . on ( "themechange" , function ( ) {
1112
- drawDashboardItemsListSparklines ( ) ;
1113
- } ) ;
1114
- } ) ;
1115
1115
$ ( function ( ) {
1116
1116
1117
1117
$ ( '.actions-list > li' ) . on ( 'click' , '.check' , function ( e ) {
@@ -1218,21 +1218,6 @@ $(function() {
1218
1218
$ ( this ) . siblings ( '.input-group-addon' ) . removeClass ( 'focus' ) ;
1219
1219
} ) ;
1220
1220
} ) ;
1221
- // Animating dropdowns is temporary disabled
1222
- // Please feel free to send a pull request :)
1223
-
1224
- // $(function() {
1225
- // $('.nav-profile > li > a').on('click', function() {
1226
- // var $el = $(this).next();
1227
-
1228
-
1229
- // animate({
1230
- // name: 'flipInX',
1231
- // selector: $el
1232
- // });
1233
- // });
1234
- // })
1235
-
1236
1221
var modalMedia = {
1237
1222
$el : $ ( "#modal-media" ) ,
1238
1223
result : { } ,
@@ -1256,6 +1241,21 @@ var modalMedia = {
1256
1241
}
1257
1242
}
1258
1243
} ;
1244
+ // Animating dropdowns is temporary disabled
1245
+ // Please feel free to send a pull request :)
1246
+
1247
+ // $(function() {
1248
+ // $('.nav-profile > li > a').on('click', function() {
1249
+ // var $el = $(this).next();
1250
+
1251
+
1252
+ // animate({
1253
+ // name: 'flipInX',
1254
+ // selector: $el
1255
+ // });
1256
+ // });
1257
+ // })
1258
+
1259
1259
$ ( function ( ) {
1260
1260
1261
1261
// Local storage settings
0 commit comments