Commit b217d4da authored by Gábor Hojtsy's avatar Gábor Hojtsy

#157752 by quicksketch: extend AHAH functionality to most types of form...

#157752 by quicksketch: extend AHAH functionality to most types of form elements, without writing JavaScript. Also AHAH enable the blocks admin page. (part 2)
parent 31b73898
// $Id$
/*
* jQuery form plugin
* @requires jQuery v1.1 or later
*
* Examples at: http://malsup.com/jquery/form/
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Version: 1.0.3
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){$.7.1f=5(o){3(H o==\'5\')o={K:o};o=$.25({1b:4.R(\'1J\')||1i.2q,P:4.R(\'2b\')||\'27\'},o||{});2 a=4.1v(o.2V);3(o.1M&&o.1M(a,4,o)===F)6 4;2 p={};$.N.O(\'Y.G.2m\',[a,4,o,p]);3(p.3s)6 4;2 q=$.1A(a);3(o.P.3j()==\'27\'){o.1b+=(o.1b.3g(\'?\')>=0?\'&\':\'?\')+q;o.19=B}A o.19=q;2 r=4,M=[];3(o.1p)M.C(5(){r.1p()});3(o.1o)M.C(5(){r.1o()});3(!o.16&&o.15){2 u=o.K;M.C(5(a){$(o.15).R("1K",a).2I().Q(u,2C)})}A 3(o.K)M.C(o.K);o.K=5(a,b){J(2 i=0,D=M.E;i<D;i++)M[i](a,b,r)};2 v=$(\'12:2p\',4).11();2 w=F;J(2 j=0;j<v.E;j++)3(v[j])w=18;3(o.2h||w)2d();A $.3p(o);$.N.O(\'Y.G.3o\',[4,o]);6 4;5 2d(){2 d=r[0];2 f=$.25({},$.3i,o);2 h=\'3e\'+$.7.1f.1e++;2 i=$(\'<2h 3a="\'+h+\'" 8="\'+h+\'" />\');2 j=i[0];2 k=$.1w.1Z&&1i.1Z.32()<9;3($.1w.1W||k)j.2Z=\'2Y:F;1l.2X("");\';i.2W({2U:\'2T\',1Q:\'-1R\',1N:\'-1R\'});2 l={X:B,1d:B,2O:0,2N:\'n/a\',2J:5(){},2H:5(){},2F:5(){}};2 g=f.2E;3(g&&!$.2c++)$.N.O("2z");3(g)$.N.O("2y",[l,f]);2 m=0;2 n=0;1a(5(){i.2u(\'1j\');j.1I?j.1I(\'1H\',V):j.2t(\'1G\',V,F);2 a=d.1F?\'1F\':\'2s\';2 t=r.R(\'15\');r.R({15:h,2b:\'2r\',2o:\'2n/Y-19\',1J:f.1b});3(f.1h)1a(5(){n=18;V()},f.1h);d.G();r.R(\'15\',t)},10);5 V(){3(m++)6;j.1C?j.1C(\'1H\',V):j.2l(\'1G\',V,F);2 a=18;2k{3(n)2j\'1h\';2 b,I;I=j.2i?j.2i.1l:j.2g?j.2g:j.1l;l.X=I.1j?I.1j.1K:B;l.1d=I.2f?I.2f:I;3(f.16==\'2e\'||f.16==\'3r\'){2 c=I.1B(\'1z\')[0];b=c?c.z:l.X;3(f.16==\'2e\')3n("19 = "+b);A $.3k(b)}A 3(f.16==\'2a\'){b=l.1d;3(!b&&l.X!=B)b=29(l.X)}A{b=l.X}}3h(e){a=F;$.3f(f,l,\'26\',e)}3(a){f.K(b,\'K\');3(g)$.N.O("3d",[l,f])}3(g)$.N.O("3c",[l,f]);3(g&&!--$.2c)$.N.O("3b");3(f.24)f.24(l,a?\'K\':\'26\');1a(5(){i.39();l.1d=B},38)};5 29(s,a){3(1i.22){a=21 22(\'37.36\');a.35=\'F\';a.34(s)}A a=(21 33()).31(s,\'1u/2a\');6(a&&a.1X&&a.1X.1t!=\'30\')?a:B}}};$.7.1f.1e=0;$.7.T=5(a){6 4.1V().G(1s).Q(5(){4.1r=$.7.T.1e++;$.7.T.1q[4.1r]=a;$(":G,12:U",4).1U(1m)})};$.7.T.1e=1;$.7.T.1q={};5 1m(e){2 a=4.Y;a.L=4;3(4.P==\'U\'){3(e.1T!=17){a.S=e.1T;a.Z=e.2S}A 3(H $.7.1P==\'5\'){2 b=$(4).1P();a.S=e.1S-b.1N;a.Z=e.1O-b.1Q}A{a.S=e.1S-4.2R;a.Z=e.1O-4.2Q}}1a(5(){a.L=a.S=a.Z=B},10)};5 1s(){2 a=4.1r;2 b=$.7.T.1q[a];$(4).1f(b);6 F};$.7.1V=5(){4.1Y(\'G\',1s);6 4.Q(5(){$(":G,12:U",4).1Y(\'1U\',1m)})};$.7.1v=5(b){2 a=[];3(4.E==0)6 a;2 c=4[0];2 d=b?c.1B(\'*\'):c.2P;3(!d)6 a;J(2 i=0,D=d.E;i<D;i++){2 e=d[i];2 n=e.8;3(!n)1x;3(b&&c.L&&e.P=="U"){3(!e.1n&&c.L==e)a.C({8:n+\'.x\',z:c.S},{8:n+\'.y\',z:c.Z});1x}2 v=$.11(e,18);3(v&&v.1c==1g){J(2 j=0,1L=v.E;j<1L;j++)a.C({8:n,z:v[j]})}A 3(v!==B&&H v!=\'17\')a.C({8:n,z:v})}3(!b&&c.L){2 f=c.1B("12");J(2 i=0,D=f.E;i<D;i++){2 g=f[i];2 n=g.8;3(n&&!g.1n&&g.P=="U"&&c.L==g)a.C({8:n+\'.x\',z:c.S},{8:n+\'.y\',z:c.Z})}}6 a};$.7.2M=5(a){6 $.1A(4.1v(a))};$.7.2L=5(b){2 a=[];4.Q(5(){2 n=4.8;3(!n)6;2 v=$.11(4,b);3(v&&v.1c==1g){J(2 i=0,D=v.E;i<D;i++)a.C({8:n,z:v[i]})}A 3(v!==B&&H v!=\'17\')a.C({8:4.8,z:v})});6 $.1A(a)};$.7.11=5(a){J(2 b=[],i=0,D=4.E;i<D;i++){2 c=4[i];2 v=$.11(c,a);3(v===B||H v==\'17\'||(v.1c==1g&&!v.E))1x;v.1c==1g?$.2K(b,v):b.C(v)}6 b};$.11=5(b,c){2 n=b.8,t=b.P,W=b.1t.20();3(H c==\'17\')c=18;3(c&&(!n||b.1n||t==\'14\'||t==\'2G\'||(t==\'23\'||t==\'1E\')&&!b.1D||(t==\'G\'||t==\'U\')&&b.Y&&b.Y.L!=b||W==\'13\'&&b.1k==-1))6 B;3(W==\'13\'){2 d=b.1k;3(d<0)6 B;2 a=[],1y=b.2D;2 e=(t==\'13-2B\');2 f=(e?d+1:1y.E);J(2 i=(e?d:0);i<f;i++){2 g=1y[i];3(g.2A){2 v=$.1w.1W&&!(g.3l[\'z\'].3m)?g.1u:g.z;3(e)6 v;a.C(v)}}6 a}6 b.z};$.7.1o=5(){6 4.Q(5(){$(\'12,13,1z\',4).28()})};$.7.28=$.7.2x=5(){6 4.Q(5(){2 t=4.P,W=4.1t.20();3(t==\'1u\'||t==\'2w\'||W==\'1z\')4.z=\'\';A 3(t==\'23\'||t==\'1E\')4.1D=F;A 3(W==\'13\')4.1k=-1})};$.7.1p=5(){6 4.Q(5(){3(H 4.14==\'5\'||(H 4.14==\'3q\'&&!4.14.2v))4.14()})}})(3t);',62,216,'||var|if|this|function|return|fn|name|||||||||||||||||||||||||||value|else|null|push|max|length|false|submit|typeof|doc|for|success|clk|callbacks|event|trigger|type|each|attr|clk_x|ajaxForm|image|cb|tag|responseText|form|clk_y||fieldValue|input|select|reset|target|dataType|undefined|true|data|setTimeout|url|constructor|responseXML|counter|ajaxSubmit|Array|timeout|window|body|selectedIndex|document|clickHandler|disabled|clearForm|resetForm|optionHash|formPluginId|submitHandler|tagName|text|formToArray|browser|continue|ops|textarea|param|getElementsByTagName|detachEvent|checked|radio|encoding|load|onload|attachEvent|action|innerHTML|jmax|beforeSubmit|left|pageY|offset|top|1000px|pageX|offsetX|click|ajaxFormUnbind|msie|documentElement|unbind|opera|toLowerCase|new|ActiveXObject|checkbox|complete|extend|error|GET|clearFields|toXml|xml|method|active|fileUpload|json|XMLDocument|contentDocument|iframe|contentWindow|throw|try|removeEventListener|validate|multipart|encAttr|file|location|POST|enctype|addEventListener|appendTo|nodeType|password|clearInputs|ajaxSend|ajaxStart|selected|one|arguments|options|global|setRequestHeader|button|getResponseHeader|evalScripts|getAllResponseHeaders|merge|fieldSerialize|formSerialize|statusText|status|elements|offsetTop|offsetLeft|offsetY|absolute|position|semantic|css|write|javascript|src|parsererror|parseFromString|version|DOMParser|loadXML|async|XMLDOM|Microsoft|100|remove|id|ajaxStop|ajaxComplete|ajaxSuccess|jqFormIO|handleError|indexOf|catch|ajaxSettings|toUpperCase|globalEval|attributes|specified|eval|notify|ajax|object|script|veto|jQuery'.split('|'),0,{}))
......@@ -2,7 +2,7 @@
// $Id$
/**
* @file block-admin-display.tpl.php
* @file block-admin-display-form.tpl.php
* Default theme implementation to configure blocks.
*
* Available variables:
......@@ -21,11 +21,12 @@
* - $data->configure_link: Block configuration link.
* - $data->delete_link: For deleting user added blocks.
*
* @see template_preprocess_block_admin_display()
* @see template_preprocess_block_admin_display_form()
* @see theme_block_admin_display()
*/
?>
<?php drupal_add_js('misc/tableheader.js'); ?>
<?php print $messages; ?>
<table id="blocks">
<thead>
......@@ -48,8 +49,8 @@
</tr>
<?php $row++; ?>
<?php endif; ?>
<tr class="<?php print $row % 2 == 0 ? 'odd' : 'even'; ?>">
<td class="block"><?php print $data->block_title; ?></td>
<tr class="<?php print $row % 2 == 0 ? 'odd' : 'even'; ?><?php print $data->row_class ? ' '. $data->row_class : ''; ?>">
<td class="block"><?php print $data->block_title; ?><?php print $data->block_modified ? '<span class="warning">*</span>' : ''; ?></td>
<td><?php print $data->region_select; ?></td>
<td><?php print $data->weight_select; ?></td>
<?php if ($throttle): ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment