Changeset 694698 for developer/trunk/developer.js
- Timestamp:
- 04/09/2013 06:08:58 PM (13 years ago)
- File:
-
- 1 edited
-
developer/trunk/developer.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
developer/trunk/developer.js
r592210 r694698 6 6 href: href, 7 7 title: a8c_developer_i18n.lightbox_title, 8 innerWidth: 500,8 innerWidth: 650, 9 9 maxHeight: '100%', 10 10 transition: transition … … 61 61 .success( function( result ) { 62 62 if ( '1' === result ) { 63 $(button).html( a8c_developer_i18n.installed ); 63 $( button ) 64 .html( a8c_developer_i18n.installed ) 65 .nextAll( '.a8c-developer-action-result' ) 66 .remove(); 67 64 68 $(button).unbind('click').prop('disabled', true); 65 69 } else { 66 70 alert( result ); 67 $(button).html( a8c_developer_i18n.error ); 68 } 69 }) 70 .error( function() { 71 $(button).html( a8c_developer_i18n.error ); 71 72 $( button ) 73 .html( a8c_developer_i18n.ERROR ) 74 .nextAll( '.a8c-developer-action-result' ) 75 .remove(); 76 77 $( button ).after( '<span class="a8c-developer-action-result error">' + result + '</span>' ); 78 } 79 }) 80 .error( function( response ) { 81 $( button ) 82 .html( a8c_developer_i18n.ERROR ) 83 .nextAll( '.a8c-developer-action-result' ) 84 .remove(); 85 86 $( button ).after( '<span class="a8c-developer-action-result error">' + response.statusText + ': ' + response.responseText + '</span>' ); 72 87 }) 73 88 ; … … 86 101 .success( function( result ) { 87 102 if ( '1' === result ) { 88 $(button).html( a8c_developer_i18n.activated ); 103 $( button ) 104 .html( a8c_developer_i18n.activated ) 105 .nextAll( '.a8c-developer-action-result' ) 106 .remove(); 107 89 108 $(button).unbind('click').prop('disabled', true); 90 109 } else { 91 110 alert( result ); 92 $(button).html( a8c_developer_i18n.error ); 93 } 94 }) 95 .error( function() { 96 $(button).html( a8c_developer_i18n.error ); 97 }) 98 ; 111 112 $( button ) 113 .html( a8c_developer_i18n.ERROR ) 114 .nextAll( '.a8c-developer-action-result' ) 115 .remove(); 116 117 $( button ).after( '<span class="a8c-developer-action-result error">' + result + '</span>' ); 118 } 119 }) 120 .error( function( response ) { 121 $( button ) 122 .html( a8c_developer_i18n.ERROR ) 123 .nextAll( '.a8c-developer-action-result' ) 124 .remove(); 125 126 $( button ).after( '<span class="a8c-developer-action-result error">' + response.statusText + ': ' + response.responseText + '</span>' ); 127 }) 128 ; 129 }); 130 131 $( '.a8c-developer-button-close' ).on( 'click', function() { 132 $.colorbox.close(); 99 133 }); 100 134 })(jQuery); … … 115 149 .success( function( result ) { 116 150 if ( '1' == result ) { 117 $(button).html( a8c_developer_i18n.INSTALLED ); 118 } else { 119 $(button).html( a8c_developer_i18n.ERROR ); 120 } 121 }) 122 .error( function() { 123 $(button).html( a8c_developer_i18n.ERROR ); 151 $( button ) 152 .nextAll( '.a8c-developer-action-result' ) 153 .remove(); 154 155 $( button ).replaceWith( "<span class='a8c-developer-active'>" + a8c_developer_i18n.ACTIVE + "</span>" ); 156 } else { 157 $( button ) 158 .html( a8c_developer_i18n.ERROR ) 159 .nextAll( '.a8c-developer-action-result' ) 160 .remove(); 161 162 $( button ).after( '<span class="a8c-developer-action-result error">' + result + '</span>' ); 163 } 164 }) 165 .error( function( response ) { 166 $( button ) 167 .html( a8c_developer_i18n.ERROR ) 168 .nextAll( '.a8c-developer-action-result' ) 169 .remove(); 170 171 $( button ).after( '<span class="a8c-developer-action-result error">' + response.statusText + ': ' + response.responseText + '</span>' ); 124 172 }) 125 173 ; … … 140 188 .success( function( result ) { 141 189 if ( '1' == result ) { 142 $(button).replaceWith("<span class='a8c-developer-active'>" + a8c_developer_i18n.ACTIVE + "</span>"); 143 } else { 144 $(button).html( a8c_developer_i18n.ERROR ); 145 } 146 }) 147 .error( function() { 148 $(button).html( a8c_developer_i18n.ERROR ); 190 $( button ) 191 .nextAll( '.a8c-developer-action-result' ) 192 .remove(); 193 194 $( button ).replaceWith( "<span class='a8c-developer-active'>" + a8c_developer_i18n.ACTIVE + "</span>" ); 195 } else { 196 $( button ) 197 .html( a8c_developer_i18n.ERROR ) 198 .nextAll( '.a8c-developer-action-result' ) 199 .remove(); 200 201 $( button ).after( '<span class="a8c-developer-action-result error">' + result + '</span>' ); 202 } 203 }) 204 .error( function( response ) { 205 $( button ) 206 .html( a8c_developer_i18n.ERROR ) 207 .nextAll( '.a8c-developer-action-result' ) 208 .remove(); 209 210 $( button ).after( '<span class="a8c-developer-action-result error">' + response.statusText + ': ' + response.responseText + '</span>' ); 211 149 212 }) 150 213 ;
Note: See TracChangeset
for help on using the changeset viewer.