Changeset 8642
- Timestamp:
- 07/17/2014 07:19:23 PM (11 years ago)
- Location:
- trunk/src/bp-xprofile/admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/admin/css/admin-rtl.css
r8639 r8642 77 77 } 78 78 79 .bp-option a.delete, 79 80 .field-wrapper a.deletion, 80 81 .tab-toolbar a.deletion { 81 82 color: #f00; 82 83 border-bottom: 1px solid #f00; 83 font-size: 12px;84 84 text-decoration: none; 85 85 padding: 0; 86 margin: -2px 5px 0 0; 87 } 88 89 div.actions div.delete-button { 86 } 87 88 div.delete-button { 90 89 float: right; 91 90 line-height: 28px; 92 } 93 94 div.tab-toolbar a.button-primary { 95 color: #fff !important; /* Overriding a WP !important */ 91 margin: 0 10px 0 0; 96 92 } 97 93 … … 106 102 .tab-wrapper fieldset { 107 103 position: relative; 108 cursor: default !important;109 104 cursor: default; 105 } 110 106 .tab-wrapper fieldset legend { 111 107 font-weight: bold; … … 118 114 border: 1px solid #ddd; 119 115 margin: 10px 0; 120 cursor: move !important;116 cursor: move; 121 117 background: #fafafa; 122 118 padding: 10px 0 0 ; … … 156 152 display: block; 157 153 } 154 .bp-options-box .ui-sortable-placeholder, 158 155 .field-group fieldset.ui-sortable-placeholder { 159 156 border: 1px dashed #999; … … 192 189 font-size: 11px; 193 190 color: #555; 194 }195 196 select.multi-select {197 width:90%;198 height:10em !important;199 191 } 200 192 … … 214 206 } 215 207 216 div.options-box { 217 margin-right: 20px !important; 218 margin-left: 10px !important; 219 border-right: 4px solid #EAF3FA; 220 padding-right: 15px; 208 p.bp-option { 209 background: #fafafa; 210 border: 1px solid #dfdfdf; 211 margin: 10px 0; 212 padding: 10px 5px; 213 } 214 215 p.bp-option:hover { 216 border: 1px solid #999; 217 } 218 219 .bp-option-icon { 220 font: normal 20px/1 'dashicons'; 221 speak: none; 222 display: inline-block; 223 padding: 0 2px 0 0; 224 top: 5px; 225 position: relative; 226 vertical-align: top; 227 -webkit-font-smoothing: antialiased; 228 -moz-osx-font-smoothing: grayscale; 229 text-decoration: none !important; 230 color: #888; 231 } 232 233 p.bp-option .grabber:before { 234 content: "\f329"; 221 235 } 222 236 -
trunk/src/bp-xprofile/admin/css/admin.css
r8639 r8642 77 77 } 78 78 79 .bp-option a.delete, 79 80 .field-wrapper a.deletion, 80 81 .tab-toolbar a.deletion { 81 82 color: #f00; 82 83 border-bottom: 1px solid #f00; 83 font-size: 12px;84 84 text-decoration: none; 85 85 padding: 0; 86 margin: -2px 0 0 5px; 87 } 88 89 div.actions div.delete-button { 86 } 87 88 div.delete-button { 90 89 float: right; 91 90 line-height: 28px; 92 } 93 94 div.tab-toolbar a.button-primary { 95 color: #fff !important; /* Overriding a WP !important */ 91 margin: 0 10px 0 0; 96 92 } 97 93 … … 106 102 .tab-wrapper fieldset { 107 103 position: relative; 108 cursor: default !important;109 104 cursor: default; 105 } 110 106 .tab-wrapper fieldset legend { 111 107 font-weight: bold; … … 118 114 border: 1px solid #ddd; 119 115 margin: 10px 0; 120 cursor: move !important;116 cursor: move; 121 117 background: #fafafa; 122 118 padding: 10px 0 0 ; … … 156 152 display: block; 157 153 } 154 .bp-options-box .ui-sortable-placeholder, 158 155 .field-group fieldset.ui-sortable-placeholder { 159 156 border: 1px dashed #999; … … 192 189 font-size: 11px; 193 190 color: #555; 194 }195 196 select.multi-select {197 width:90%;198 height:10em !important;199 191 } 200 192 … … 214 206 } 215 207 216 div.options-box { 217 margin-left: 20px !important; 218 margin-right: 10px !important; 219 border-left: 4px solid #EAF3FA; 220 padding-left: 15px; 208 p.bp-option { 209 background: #fafafa; 210 border: 1px solid #dfdfdf; 211 margin: 10px 0; 212 padding: 10px 5px; 213 } 214 215 p.bp-option:hover { 216 border: 1px solid #999; 217 } 218 219 .bp-option-icon { 220 font: normal 20px/1 'dashicons'; 221 speak: none; 222 display: inline-block; 223 padding: 0 0 0 2px; 224 top: 5px; 225 position: relative; 226 vertical-align: top; 227 -webkit-font-smoothing: antialiased; 228 -moz-osx-font-smoothing: grayscale; 229 text-decoration: none !important; 230 color: #888; 231 } 232 233 p.bp-option .grabber:before { 234 content: "\f329"; 221 235 } 222 236 -
trunk/src/bp-xprofile/admin/js/admin.js
r8640 r8642 12 12 theId = document.getElementById(forWhat + '_option_number').value, 13 13 newDiv = document.createElement('p'), 14 newOption = document.createElement('input'),15 span = document.createElement( 'span' ),16 txt = document.createTextNode( '\u00A0\u039E\u00A0' ),14 grabber = document.createElement( 'span' ), 15 newOption = document.createElement( 'input' ), 16 label = document.createElement( 'label' ), 17 17 isDefault = document.createElement( 'input' ), 18 span1 = document.createElement( 'span' ), 19 txt1 = document.createTextNode( ' Default Value ' ), 20 21 toDelete = document.createElement( 'a' ), 22 toDeleteText = document.createTextNode( '[x]' ); 18 txt1 = document.createTextNode( 'Default Value' ), 19 toDeleteText = document.createTextNode( 'Delete' ), 20 toDeleteWrap = document.createElement( 'div' ); 21 toDelete = document.createElement( 'a' ); 23 22 24 23 newDiv.setAttribute('id', forWhat + '_div' + theId); 25 newDiv.setAttribute('class', 'sortable'); 24 newDiv.setAttribute('class', 'bp-option sortable'); 25 26 grabber.setAttribute( 'class', 'bp-option-icon grabber'); 26 27 27 28 newOption.setAttribute( 'type', 'text' ); 28 29 newOption.setAttribute( 'name', forWhat + '_option[' + theId + ']' ); 29 30 newOption.setAttribute( 'id', forWhat + '_option' + theId ); 30 31 span.appendChild( txt );32 31 33 32 if ( forWhat === 'checkbox' || forWhat === 'multiselectbox' ) { … … 41 40 isDefault.setAttribute( 'value', theId ); 42 41 43 span1.appendChild( txt1 );44 45 42 toDelete.setAttribute( 'href', 'javascript:hide("' + forWhat + '_div' + theId + '")' ); 46 43 toDelete.setAttribute( 'class', 'delete' ); 47 44 toDelete.appendChild( toDeleteText ); 48 45 49 newDiv.appendChild( span ); 46 toDeleteWrap.setAttribute( 'class', 'delete-button' ); 47 toDeleteWrap.appendChild( toDelete ); 48 49 label.appendChild( document.createTextNode( ' ' ) ); 50 label.appendChild( isDefault ); 51 label.appendChild( document.createTextNode( ' ' ) ); 52 label.appendChild( txt1 ); 53 label.appendChild( document.createTextNode( ' ' ) ); 54 55 newDiv.appendChild( grabber ); 56 newDiv.appendChild( document.createTextNode( ' ' ) ); 50 57 newDiv.appendChild( newOption ); 51 newDiv.appendChild( document.createTextNode( ' ' ) ); 52 newDiv.appendChild( isDefault ); 53 newDiv.appendChild( span1 ); 54 newDiv.appendChild( toDelete ); 58 newDiv.appendChild( label ); 59 newDiv.appendChild( toDeleteWrap ); 55 60 holder.appendChild( newDiv ); 56 61 … … 100 105 101 106 function enableSortableFieldOptions( forWhat ) { 102 if ( jQuery( '#' + forWhat + ' p.sortable' ).length > 1 ) { 103 jQuery( '.bp-options-box' ).sortable( { 104 items: 'p.sortable', 105 tolerance: 'pointer', 106 axis: 'y', 107 handle: 'span' 108 }); 109 110 jQuery( '.sortable span' ).css( 'cursor', 'move' ); 111 } 107 jQuery( '.bp-options-box' ).sortable( { 108 cursor: 'move', 109 items: 'p.sortable', 110 tolerance: 'intersect', 111 axis: 'y' 112 }); 113 114 jQuery( '.sortable, .sortable span' ).css( 'cursor', 'move' ); 112 115 } 113 116 114 117 function destroySortableFieldOptions() { 115 118 jQuery( '.bp-options-box' ).sortable( 'destroy' ); 116 jQuery( '.sortable span' ).css( 'cursor', 'default' );119 jQuery( '.sortable, .sortable span' ).css( 'cursor', 'default' ); 117 120 } 118 121
Note: See TracChangeset
for help on using the changeset viewer.