wp/wp-admin/js/common.js
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
   852 		var viewportWidth = getViewportWidth() || 961;
   852 		var viewportWidth = getViewportWidth() || 961;
   853 
   853 
   854 		// Reset any compensation for submenus near the bottom of the screen.
   854 		// Reset any compensation for submenus near the bottom of the screen.
   855 		$('#adminmenu div.wp-submenu').css('margin-top', '');
   855 		$('#adminmenu div.wp-submenu').css('margin-top', '');
   856 
   856 
   857 		if ( viewportWidth < 960 ) {
   857 		if ( viewportWidth <= 960 ) {
   858 			if ( $body.hasClass('auto-fold') ) {
   858 			if ( $body.hasClass('auto-fold') ) {
   859 				$body.removeClass('auto-fold').removeClass('folded');
   859 				$body.removeClass('auto-fold').removeClass('folded');
   860 				setUserSetting('unfold', 1);
   860 				setUserSetting('unfold', 1);
   861 				setUserSetting('mfold', 'o');
   861 				setUserSetting('mfold', 'o');
   862 				menuState = 'open';
   862 				menuState = 'open';
  1307 		$('div.default-password-nag').hide();
  1307 		$('div.default-password-nag').hide();
  1308 		return false;
  1308 		return false;
  1309 	});
  1309 	});
  1310 
  1310 
  1311 	/**
  1311 	/**
  1312 	 * Handles tab keypresses in theme and plugin editor textareas.
  1312 	 * Handles tab keypresses in theme and plugin file editor textareas.
  1313 	 *
  1313 	 *
  1314 	 * @param {Event} e The event object.
  1314 	 * @param {Event} e The event object.
  1315 	 *
  1315 	 *
  1316 	 * @return {void}
  1316 	 * @return {void}
  1317 	 */
  1317 	 */
  1706 			});
  1706 			});
  1707 
  1707 
  1708 			self.trigger();
  1708 			self.trigger();
  1709 			$document.on( 'wp-window-resized.wp-responsive', this.trigger.bind( this ) );
  1709 			$document.on( 'wp-window-resized.wp-responsive', this.trigger.bind( this ) );
  1710 
  1710 
  1711 			// This needs to run later as UI Sortable may be initialized later on $(document).ready().
  1711 			// This needs to run later as UI Sortable may be initialized when the document is ready.
  1712 			$window.on( 'load.wp-responsive', this.maybeDisableSortables );
  1712 			$window.on( 'load.wp-responsive', this.maybeDisableSortables );
  1713 			$document.on( 'postbox-toggled', this.maybeDisableSortables );
  1713 			$document.on( 'postbox-toggled', this.maybeDisableSortables );
  1714 
  1714 
  1715 			// When the screen columns are changed, potentially disable sortables.
  1715 			// When the screen columns are changed, potentially disable sortables.
  1716 			$( '#screen-options-wrap input' ).on( 'click', this.maybeDisableSortables );
  1716 			$( '#screen-options-wrap input' ).on( 'click', this.maybeDisableSortables );