File tree Expand file tree Collapse file tree 5 files changed +48
-36
lines changed
Expand file tree Collapse file tree 5 files changed +48
-36
lines changed Original file line number Diff line number Diff line change 1+ # This file is for unifying the coding style for different editors and IDEs
2+ # editorconfig.org
3+
4+ root = true
5+
6+ [* ]
7+ indent_style = space
8+ indent_size = 4
9+ end_of_line = lf
10+ charset = utf-8
11+ trim_trailing_whitespace = true
12+ insert_final_newline = true
Original file line number Diff line number Diff line change 1- /*! Listable v0.9.2 - 2015-03-20
2- * Author: Sean Zellmer
1+ /*! Listable v0.9.2 - 2015-03-20
2+ * Author: Sean Zellmer
33 * License: MIT
44 */
55
66; ( function ( $ , window , document , undefined ) {
7-
7+
88 var update = false , // Whether the current form is an update or not
99 no_focus = true ;
1010
1111 $ . widget ( 'ui.listable' , $ . ui . mouse , {
1212 // Options to be used as defaults
1313 options : {
1414 'add' : true , // Broken but should enable adding list items
15- 'add_after' : true , // Maybe Broken. Might need to be changed to default false and to set adding new items at the top of the list
15+ 'add_after' : true , // Maybe Broken. Might need to be changed to default false and to set adding new items at the top of the list
1616 'add_image' : '/javascripts/listable/images/add.png' ,
1717 'auto_build' : true ,
1818 'connectWith' : '' ,
6868 }
6969
7070 // ===== Lets build things =====
71-
71+
7272 // ----- Build listable from existing elements -----
7373 $ . fn . listable . counter += settings . variable_vault . find ( 'input[name^="type"]' ) . length + 1 ;
7474 if ( settings . auto_build ) {
391391 }
392392 } ) ;
393393 }
394-
395-
394+
395+
396396 return this ;
397397 } ,
398398
555555
556556 // Make sure all elements are in order
557557 this . update_order ( ) ;
558-
558+
559559 return this ;
560560 } ,
561561
601601 that . current_divider = that . element . find ( '.field_divider' ) . filter ( ':first' ) ;
602602 }
603603 }
604-
604+
605605 // Find all label[] hidden inputs and then sort by order[] from high to low
606606 settings . variable_vault . find ( 'input[name^="type"]' ) . sort ( function ( a , b ) {
607607 return settings . variable_vault . find ( 'input.' + $ ( b ) . attr ( 'class' ) + '[name^="order"]' ) . val ( ) - settings . variable_vault . find ( 'input.' + $ ( a ) . attr ( 'class' ) + '[name^="order"]' ) . val ( ) ;
Original file line number Diff line number Diff line change 7070/* ----------------------------------------
7171 Controls
7272---------------------------------------- */
73- .listable-controls {
74- position : absolute;
75- display : none;
76- padding : 10px ;
77- background-color : # F0EAE1 ;
78- -moz-border-radius : 3px 3px 3px 3px ;
79- border-radius : 3px ;
80- -moz-box-shadow : 0 1px 2px # 666666 ;
81- box-shadow : 0 1px 2px # 666 ;
82- margin-left : -233px ;
73+ .listable-controls {
74+ position : absolute;
75+ display : none;
76+ padding : 10px ;
77+ background-color : # F0EAE1 ;
78+ -moz-border-radius : 3px 3px 3px 3px ;
79+ border-radius : 3px ;
80+ -moz-box-shadow : 0 1px 2px # 666666 ;
81+ box-shadow : 0 1px 2px # 666 ;
82+ margin-left : -233px ;
8383}
8484
8585/* ----------------------------------------
Original file line number Diff line number Diff line change 11; ( function ( $ , window , document , undefined ) {
2-
2+
33 var update = false , // Whether the current form is an update or not
44 no_focus = true ;
55
66 $ . widget ( 'ui.listable' , $ . ui . mouse , {
77 // Options to be used as defaults
88 options : {
99 'add' : true , // Broken but should enable adding list items
10- 'add_after' : true , // Maybe Broken. Might need to be changed to default false and to set adding new items at the top of the list
10+ 'add_after' : true , // Maybe Broken. Might need to be changed to default false and to set adding new items at the top of the list
1111 'add_image' : '/javascripts/listable/images/add.png' ,
1212 'auto_build' : true ,
1313 'connectWith' : '' ,
6363 }
6464
6565 // ===== Lets build things =====
66-
66+
6767 // ----- Build listable from existing elements -----
6868 $ . fn . listable . counter += settings . variable_vault . find ( 'input[name^="type"]' ) . length + 1 ;
6969 if ( settings . auto_build ) {
386386 }
387387 } ) ;
388388 }
389-
390-
389+
390+
391391 return this ;
392392 } ,
393393
550550
551551 // Make sure all elements are in order
552552 this . update_order ( ) ;
553-
553+
554554 return this ;
555555 } ,
556556
596596 that . current_divider = that . element . find ( '.field_divider' ) . filter ( ':first' ) ;
597597 }
598598 }
599-
599+
600600 // Find all label[] hidden inputs and then sort by order[] from high to low
601601 settings . variable_vault . find ( 'input[name^="type"]' ) . sort ( function ( a , b ) {
602602 return settings . variable_vault . find ( 'input.' + $ ( b ) . attr ( 'class' ) + '[name^="order"]' ) . val ( ) - settings . variable_vault . find ( 'input.' + $ ( a ) . attr ( 'class' ) + '[name^="order"]' ) . val ( ) ;
Original file line number Diff line number Diff line change 7070/* ----------------------------------------
7171 Controls
7272---------------------------------------- */
73- .listable-controls {
74- position : absolute;
75- display : none;
76- padding : 10px ;
77- background-color : # F0EAE1 ;
78- -moz-border-radius : 3px 3px 3px 3px ;
79- border-radius : 3px ;
80- -moz-box-shadow : 0 1px 2px # 666666 ;
81- box-shadow : 0 1px 2px # 666 ;
82- margin-left : -233px ;
73+ .listable-controls {
74+ position : absolute;
75+ display : none;
76+ padding : 10px ;
77+ background-color : # F0EAE1 ;
78+ -moz-border-radius : 3px 3px 3px 3px ;
79+ border-radius : 3px ;
80+ -moz-box-shadow : 0 1px 2px # 666666 ;
81+ box-shadow : 0 1px 2px # 666 ;
82+ margin-left : -233px ;
8383}
8484
8585/* ----------------------------------------
You can’t perform that action at this time.
0 commit comments