From caac2ea4b292613605c48583c2f0bec61f7ff9ea Mon Sep 17 00:00:00 2001 From: joyqi Date: Wed, 16 Oct 2013 01:37:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9E=E5=AE=9A=E8=87=AA=E5=8A=A8=E4=BF=9D?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/css/style.css | 2 + admin/javascript/jquery-ui.js | 1508 +++++++++++++++-------------- admin/javascript/tokeninput.js | 6 +- admin/javascript/typecho.js | 109 +++ admin/write-js.php | 47 + admin/write-post.php | 2 +- var/Widget/Contents/Page/Edit.php | 6 +- var/Widget/Contents/Post/Edit.php | 6 +- 8 files changed, 974 insertions(+), 712 deletions(-) diff --git a/admin/css/style.css b/admin/css/style.css index c4f28704..37628cac 100644 --- a/admin/css/style.css +++ b/admin/css/style.css @@ -2119,6 +2119,8 @@ ul.typecho-list-notable li .loading { } #ui-datepicker-div .ui-datepicker-close { float: right; } +.ui-effects-transfer { border: 2px dotted #ccc; } + /* * Jquery Tokeninput diff --git a/admin/javascript/jquery-ui.js b/admin/javascript/jquery-ui.js index bbc37410..270e347d 100644 --- a/admin/javascript/jquery-ui.js +++ b/admin/javascript/jquery-ui.js @@ -1,6 +1,6 @@ -/*! jQuery UI - v1.10.3 - 2013-10-14 +/*! jQuery UI - v1.10.3 - 2013-10-15 * http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.datepicker.js, jquery.ui.slider.js, jquery.ui.effect.js, jquery.ui.effect-bounce.js, jquery.ui.effect-highlight.js, jquery.ui.effect-shake.js +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.spinner.js, jquery.ui.effect.js, jquery.ui.effect-bounce.js, jquery.ui.effect-highlight.js, jquery.ui.effect-shake.js, jquery.ui.effect-transfer.js * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ (function( $, undefined ) { @@ -826,160 +826,409 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { })( jQuery ); (function( $, undefined ) { -var mouseHandled = false; -$( document ).mouseup( function() { - mouseHandled = false; -}); - -$.widget("ui.mouse", { - version: "1.10.3", - options: { - cancel: "input,textarea,button,select,option", - distance: 1, - delay: 0 +var lastActive, startXPos, startYPos, clickDragged, + baseClasses = "ui-button ui-widget ui-state-default ui-corner-all", + stateClasses = "ui-state-hover ui-state-active ", + typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", + formResetHandler = function() { + var form = $( this ); + setTimeout(function() { + form.find( ":ui-button" ).button( "refresh" ); + }, 1 ); }, - _mouseInit: function() { - var that = this; + radioGroup = function( radio ) { + var name = radio.name, + form = radio.form, + radios = $( [] ); + if ( name ) { + name = name.replace( /'/g, "\\'" ); + if ( form ) { + radios = $( form ).find( "[name='" + name + "']" ); + } else { + radios = $( "[name='" + name + "']", radio.ownerDocument ) + .filter(function() { + return !this.form; + }); + } + } + return radios; + }; - this.element - .bind("mousedown."+this.widgetName, function(event) { - return that._mouseDown(event); +$.widget( "ui.button", { + version: "1.10.3", + defaultElement: "