Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -16,14 +16,14 @@ |
17 | 17 | array( 'src' => 'Modules/Preview/Preview.js', 'version' => 6 ), |
18 | 18 | array( 'src' => 'Modules/Publish/Publish.js', 'version' => 6 ), |
19 | 19 | array( 'src' => 'Modules/Toc/Toc.js', 'version' => 7 ), |
20 | | - array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 40 ), |
| 20 | + array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 42 ), |
21 | 21 | array( 'src' => 'Modules/TemplateEditor/TemplateEditor.js', 'version' => 4 ), |
22 | 22 | ), |
23 | 23 | 'combined' => array( |
24 | | - array( 'src' => 'WikiEditor.combined.js', 'version' => 42 ), |
| 24 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 44 ), |
25 | 25 | ), |
26 | 26 | 'minified' => array( |
27 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 42 ), |
| 27 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 44 ), |
28 | 28 | ), |
29 | 29 | ); |
30 | 30 | static $messages = array( |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/WikiEditor/WikiEditor.combined.js |
— | — | @@ -894,8 +894,8 @@ |
895 | 895 | html: '\ |
896 | 896 | <fieldset>\ |
897 | 897 | <div class="wikieditor-toolbar-field-wrapper">\ |
898 | | - <label for="wikieditor-toolbar-link-int-target" rel="wikieditor-toolbar-tool-link-int-target"></label>\ |
899 | | - <div id="wikieditor-toolbar-link-int-target-status" style="display: inline; float:right;"></div>\ |
| 898 | + <label for="wikieditor-toolbar-link-int-target" rel="wikieditor-toolbar-tool-link-int-target" style="float:left;"></label>\ |
| 899 | + <div id="wikieditor-toolbar-link-int-target-status" style="float:right;"></div>\ |
900 | 900 | <input type="text" id="wikieditor-toolbar-link-int-target" style="width: 100%;" />\ |
901 | 901 | </div>\ |
902 | 902 | <div class="wikieditor-toolbar-field-wrapper">\ |
— | — | @@ -1118,7 +1118,7 @@ |
1119 | 1119 | .children().hide(); |
1120 | 1120 | |
1121 | 1121 | $j( '#wikieditor-toolbar-link-int-target' ) |
1122 | | - .bind( 'keypress paste cut', function() { |
| 1122 | + .bind( 'keyup paste cut', function() { |
1123 | 1123 | // Cancel the running timer if applicable |
1124 | 1124 | if ( typeof $j(this).data( 'timerID' ) != 'undefined' ) { |
1125 | 1125 | clearTimeout( $j(this).data( 'timerID' ) ); |
— | — | @@ -1751,7 +1751,6 @@ |
1752 | 1752 | close: function() { |
1753 | 1753 | $j( $j(this).data( 'context' ).$iframe[0].contentWindow.document ) |
1754 | 1754 | .unbind( 'keypress.srdialog' ); |
1755 | | - $j(this).data( 'context' ).$iframe[0].contentWindow.focus(); |
1756 | 1755 | $j(this).closest( '.ui-dialog' ).data( 'dialogaction', false ); |
1757 | 1756 | } |
1758 | 1757 | } |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -8,8 +8,8 @@ |
9 | 9 | if($j.fn.wikiEditor){$j('#toolbar').remove();$j('#wpTextbox1').wikiEditor('addModule',{'toolbar':{'main':{type:'toolbar',groups:{'format':{tools:{'bold':{labelMsg:'wikieditor-toolbar-tool-bold',type:'button',icon:{'default':'format-bold.png','en':'format-bold-B.png','de':'format-bold-F.png','fr':'format-bold-G.png','es':'format-bold-N.png','it':'format-bold-G.png','nl':'format-bold-V.png','pt':'format-bold-N.png','pt-br':'format-bold-N.png','pl':'format-bold-P.png'},action:{type:'encapsulate',options:{pre:"'''",periMsg:'wikieditor-toolbar-tool-bold-example',post:"'''"}}},'italic':{section:'main',group:'format',id:'italic',labelMsg:'wikieditor-toolbar-tool-italic',type:'button',icon:{'default':'format-italic.png','en':'format-italic-I.png','de':'format-italic-K.png','fr':'format-italic-I.png','es':'format-italic-C.png','it':'format-italic-C.png','nl':'format-italic-C.png','pt':'format-italic-I.png','pt-br':'format-italic-I.png','pl':'format-italic-K.png'},action:{type:'encapsulate',options:{pre:"''",periMsg:'wikieditor-toolbar-tool-italic-example',post:"''"}}}}},'insert':{tools:{'xlink':{labelMsg:'wikieditor-toolbar-tool-xlink',type:'button',icon:'insert-xlink.png',filters:['#wpTextbox1:not(.toolbar-dialogs)'],action:{type:'encapsulate',options:{pre:"[",periMsg:'wikieditor-toolbar-tool-xlink-example',post:"]"}}},'ilink':{labelMsg:'wikieditor-toolbar-tool-ilink',type:'button',icon:'insert-ilink.png',filters:['#wpTextbox1:not(.toolbar-dialogs)'],action:{type:'encapsulate',options:{pre:"[[",periMsg:'wikieditor-toolbar-tool-ilink-example',post:"]]"}}},'linkCGD':{labelMsg:'wikieditor-toolbar-tool-link',type:'button',icon:'insert-link.png',filters:['#wpTextbox1.toolbar-dialogs'],action:{type:'dialog',module:'insert-link'}},'file':{labelMsg:'wikieditor-toolbar-tool-file',type:'button',icon:'insert-file.png',action:{type:'encapsulate',options:{pre:"[[",preMsg:'wikieditor-toolbar-tool-file-pre',periMsg:'wikieditor-toolbar-tool-file-example',post:"]]"}}},'reference':{labelMsg:'wikieditor-toolbar-tool-reference',filters:['body.ns-subject'],type:'button',icon:'insert-reference.png',action:{type:'encapsulate',options:{pre:"<ref>",periMsg:'wikieditor-toolbar-tool-reference-example',post:"</ref>"}}},'signature':{labelMsg:'wikieditor-toolbar-tool-signature',filters:['body:not(.ns-0)'],type:'button',icon:'insert-signature.png',action:{type:'encapsulate',options:{post:"--~~~~"}}}}}}},'advanced':{labelMsg:'wikieditor-toolbar-section-advanced',type:'toolbar',groups:{'heading':{tools:{'heading':{labelMsg:'wikieditor-toolbar-tool-heading',type:'select',list:{'heading-2':{labelMsg:'wikieditor-toolbar-tool-heading-2',action:{type:'replace',options:{pre:'==',periMsg:'wikieditor-toolbar-tool-heading-example',post:'==',regex:/^(\s*)(={0,6})(.*?)\2(\s*)$/,regexReplace:"\$1==\$3==\$4",ownline:true}}},'heading-3':{labelMsg:'wikieditor-toolbar-tool-heading-3',action:{type:'replace',options:{pre:'===',periMsg:'wikieditor-toolbar-tool-heading-example',post:'===',regex:/^(\s*)(={0,6})(.*?)\2(\s*)$/,regexReplace:"\$1===\$3===\$4",ownline:true}}},'heading-4':{labelMsg:'wikieditor-toolbar-tool-heading-4',action:{type:'replace',options:{pre:'====',periMsg:'wikieditor-toolbar-tool-heading-example',post:'====',regex:/^(\s*)(={0,6})(.*?)\2(\s*)$/,regexReplace:"\$1====\$3====\$4",ownline:true}}},'heading-5':{labelMsg:'wikieditor-toolbar-tool-heading-5',action:{type:'replace',options:{pre:'=====',periMsg:'wikieditor-toolbar-tool-heading-example',post:'=====',regex:/^(\s*)(={0,6})(.*?)\2(\s*)$/,regexReplace:"\$1=====\$3=====\$4",ownline:true}}}}}}},'list':{labelMsg:'wikieditor-toolbar-group-list',tools:{'ulist':{labelMsg:'wikieditor-toolbar-tool-ulist',type:'button',icon:'format-ulist.png',action:{type:'encapsulate',options:{pre:"* ",periMsg:'wikieditor-toolbar-tool-ulist-example',post:"",ownline:true}}},'olist':{labelMsg:'wikieditor-toolbar-tool-olist',type:'button',icon:'format-olist.png',action:{type:'encapsulate',options:{pre:"# ",periMsg:'wikieditor-toolbar-tool-olist-example',post:"",ownline:true}}},'indent':{labelMsg:'wikieditor-toolbar-tool-indent',type:'button',icon:'format-indent.png',action:{type:'encapsulate',options:{pre:":",periMsg:'wikieditor-toolbar-tool-indent-example',post:"",ownline:true,splitlines:true}}}}},'size':{labelMsg:'wikieditor-toolbar-group-size',tools:{'big':{labelMsg:'wikieditor-toolbar-tool-big',type:'button',icon:'format-big.png',action:{type:'encapsulate',options:{pre:"<big>",periMsg:'wikieditor-toolbar-tool-big-example',post:"</big>"}}},'small':{labelMsg:'wikieditor-toolbar-tool-small',type:'button',icon:'format-small.png',action:{type:'encapsulate',options:{pre:"<small>",periMsg:'wikieditor-toolbar-tool-small-example',post:"</small>"}}}}},'baseline':{labelMsg:'wikieditor-toolbar-group-baseline',tools:{'superscript':{labelMsg:'wikieditor-toolbar-tool-superscript',type:'button',icon:'format-superscript.png',action:{type:'encapsulate',options:{pre:"<sup>",periMsg:'wikieditor-toolbar-tool-superscript-example',post:"</sup>"}}},'subscript':{labelMsg:'wikieditor-toolbar-tool-subscript',type:'button',icon:'format-subscript.png',action:{type:'encapsulate',options:{pre:"<sub>",periMsg:'wikieditor-toolbar-tool-subscript-example',post:"</sub>"}}}}},'insert':{labelMsg:'wikieditor-toolbar-group-insert',tools:{'gallery':{labelMsg:'wikieditor-toolbar-tool-gallery',type:'button',icon:'insert-gallery.png',action:{type:'encapsulate',options:{pre:"<gallery>\n",periMsg:'wikieditor-toolbar-tool-gallery-example',post:"\n</gallery>",ownline:true}}},'tableCGD':{labelMsg:'wikieditor-toolbar-tool-table',type:'button',icon:'insert-table.png',filters:['#wpTextbox1.toolbar-dialogs'],action:{type:'dialog',module:'insert-table'}},'table':{labelMsg:'wikieditor-toolbar-tool-table',type:'button',icon:'insert-table.png',filters:['#wpTextbox1:not(.toolbar-dialogs)'],action:{type:'encapsulate',options:{pre:"{| class=\"wikitable\" border=\"1\"\n|",periMsg:'wikieditor-toolbar-tool-table-example-old',post:"\n|}",ownline:true}}},'newline':{labelMsg:'wikieditor-toolbar-tool-newline',type:'button',icon:'insert-newline.png',action:{type:'encapsulate',options:{pre:"<br />\n"}}}}},'search':{tools:{'replace':{labelMsg:'wikieditor-toolbar-tool-replace',type:'button',icon:'search-replace.png',filters:['#wpTextbox1.toolbar-dialogs'],action:{type:'dialog',module:'search-and-replace'}}}}}},'characters':{labelMsg:'wikieditor-toolbar-section-characters',type:'booklet',pages:{'latin':{'labelMsg':'wikieditor-toolbar-characters-page-latin','layout':'characters','characters':["\u00c1","\u00e1","\u00c0","\u00e0","\u00c2","\u00e2","\u00c4","\u00e4","\u00c3","\u00e3","\u01cd","\u01ce","\u0100","\u0101","\u0102","\u0103","\u0104","\u0105","\u00c5","\u00e5","\u0106","\u0107","\u0108","\u0109","\u00c7","\u00e7","\u010c","\u010d","\u010a","\u010b","\u0110","\u0111","\u010e","\u010f","\u00c9","\u00e9","\u00c8","\u00e8","\u00ca","\u00ea","\u00cb","\u00eb","\u011a","\u011b","\u0112","\u0113","\u0114","\u0115","\u0116","\u0117","\u0118","\u0119","\u011c","\u011d","\u0122","\u0123","\u011e","\u011f","\u0120","\u0121","\u0124","\u0125","\u0126","\u0127","\u00cd","\u00ed","\u00cc","\u00ec","\u00ce","\u00ee","\u00cf","\u00ef","\u0128","\u0129","\u01cf","\u01d0","\u012a","\u012b","\u012c","\u012d","\u0130","\u0131","\u012e","\u012f","\u0134","\u0135","\u0136","\u0137","\u0139","\u013a","\u013b","\u013c","\u013d","\u013e","\u0141","\u0142","\u013f","\u0140","\u0143","\u0144","\u00d1","\u00f1","\u0145","\u0146","\u0147","\u0148","\u00d3","\u00f3","\u00d2","\u00f2","\u00d4","\u00f4","\u00d6","\u00f6","\u00d5","\u00f5","\u01d1","\u01d2","\u014c","\u014d","\u014e","\u014f","\u01ea","\u01eb","\u0150","\u0151","\u0154","\u0155","\u0156","\u0157","\u0158","\u0159","\u015a","\u015b","\u015c","\u015d","\u015e","\u015f","\u0160","\u0161","\u0162","\u0163","\u0164","\u0165","\u00da","\u00fa","\u00d9","\u00f9","\u00db","\u00fb","\u00dc","\u00fc","\u0168","\u0169","\u016e","\u016f","\u01d3","\u01d4","\u016a","\u016b","\u01d6","\u01d8","\u01da","\u01dc","\u016c","\u016d","\u0172","\u0173","\u0170","\u0171","\u0174","\u0175","\u00dd","\u00fd","\u0176","\u0177","\u0178","\u00ff","\u0232","\u0233","\u0179","\u017a","\u017d","\u017e","\u017b","\u017c","\u00c6","\u00e6","\u01e2","\u01e3","\u00d8","\u00f8","\u0152","\u0153","\u00df","\u00f0","\u00de","\u00fe","\u018f","\u0259"]},'latinextended':{'labelMsg':'wikieditor-toolbar-characters-page-latinextended','layout':'characters','characters':["\u1e00","\u1e01","\u1e9a","\u1ea0","\u1ea1","\u1ea2","\u1ea3","\u1ea4","\u1ea5","\u1ea6","\u1ea7","\u1ea8","\u1ea9","\u1eaa","\u1eab","\u1eac","\u1ead","\u1eae","\u1eaf","\u1eb0","\u1eb1","\u1eb2","\u1eb3","\u1eb4","\u1eb5","\u1eb6","\u1eb7","\u1e02","\u1e03","\u1e04","\u1e05","\u1e06","\u1e07","\u1e08","\u1e09","\u1e0a","\u1e0b","\u1e0c","\u1e0d","\u1e0e","\u1e0f","\u1e10","\u1e11","\u1e12","\u1e13","\u1e14","\u1e15","\u1e16","\u1e17","\u1e18","\u1e19","\u1e1a","\u1e1b","\u1e1c","\u1e1d","\u1eb8","\u1eb9","\u1eba","\u1ebb","\u1ebc","\u1ebd","\u1ebe","\u1ebf","\u1ec0","\u1ec1","\u1ec2","\u1ec3","\u1ec4","\u1ec5","\u1ec6","\u1ec7","\u1e1e","\u1e1f","\u1e20","\u1e21","\u1e22","\u1e23","\u1e24","\u1e25","\u1e26","\u1e27","\u1e28","\u1e29","\u1e2a","\u1e2b","\u1e96","\u1e2c","\u1e2d","\u1e2e","\u1e2f","\u1ec8","\u1ec9","\u1eca","\u1ecb","\u1e30","\u1e31","\u1e32","\u1e33","\u1e34","\u1e35","\u1e36","\u1e37","\u1e38","\u1e39","\u1e3a","\u1e3b","\u1e3c","\u1e3d","\u1efa","\u1efb","\u1e3e","\u1e3f","\u1e40","\u1e41","\u1e42","\u1e43","\u1e44","\u1e45","\u1e46","\u1e47","\u1e48","\u1e49","\u1e4a","\u1e4b","\u1e4c","\u1e4d","\u1e4e","\u1e4f","\u1e50","\u1e51","\u1e52","\u1e53","\u1ecc","\u1ecd","\u1ece","\u1ecf","\u1ed0","\u1ed1","\u1ed2","\u1ed3","\u1ed4","\u1ed5","\u1ed6","\u1ed7","\u1ed8","\u1ed9","\u1eda","\u1edb","\u1edc","\u1edd","\u1ede","\u1edf","\u1ee0","\u1ee1","\u1ee2","\u1ee3","\u1e54","\u1e55","\u1e56","\u1e57","\u1e58","\u1e59","\u1e5a","\u1e5b","\u1e5c","\u1e5d","\u1e5e","\u1e5f","\u1e60","\u1e61","\u1e9b","\u1e62","\u1e63","\u1e64","\u1e65","\u1e66","\u1e67","\u1e68","\u1e69","\u1e9c","\u1e9d","\u1e6a","\u1e6b","\u1e6c","\u1e6d","\u1e6e","\u1e6f","\u1e70","\u1e71","\u1e97","\u1e72","\u1e73","\u1e74","\u1e75","\u1e76","\u1e77","\u1e78","\u1e79","\u1e7a","\u1e7b","\u1ee4","\u1ee5","\u1ee6","\u1ee7","\u1ee8","\u1ee9","\u1eea","\u1eeb","\u1eec","\u1eed","\u1eee","\u1eef","\u1ef0","\u1ef1","\u1e7c","\u1e7d","\u1e7e","\u1e7f","\u1efc","\u1efd","\u1e80","\u1e81","\u1e82","\u1e83","\u1e84","\u1e85","\u1e86","\u1e87","\u1e88","\u1e89","\u1e98","\u1e8a","\u1e8b","\u1e8c","\u1e8d","\u1e8e","\u1e8f","\u1e99","\u1ef2","\u1ef3","\u1ef4","\u1ef5","\u1ef6","\u1ef7","\u1ef8","\u1ef9","\u1efe","\u1eff","\u1e90","\u1e91","\u1e92","\u1e93","\u1e94","\u1e95","\u1e9e","\u1e9f"]},'ipa':{labelMsg:'wikieditor-toolbar-characters-page-ipa',layout:'characters',characters:["p","t\u032a","t","\u0288","c","k","q","\u02a1","\u0294","b","d\u032a","d","\u0256","\u025f","\u0261","\u0262","\u0253","\u0257","\u0284","\u0260","\u029b","t\u0361s","t\u0361\u0283","t\u0361\u0255","d\u0361z","d\u0361\u0292","d\u0361\u0291","\u0278","f","\u03b8","s","\u0283","\u0285","\u0286","\u0282","\u0255","\u00e7","\u0267","x","\u03c7","\u0127","\u029c","h","\u03b2","v","\u028d","\u00f0","z","\u0292","\u0293","\u0290","\u0291","\u029d","\u0263","\u0281","\u0295","\u0296","\u02a2","\u0266","\u026c","\u026e","m","m\u0329","\u0271","\u0271\u0329","\u0271\u030d","n\u032a","n\u032a\u030d","n","n\u0329","\u0273","\u0273\u0329","\u0272","\u0272\u0329","\u014b","\u014b\u030d","\u014b\u0329","\u0274","\u0274\u0329","\u0299","\u0299\u0329","r","r\u0329","\u0280","\u0280\u0329","\u027e","\u027d","\u027f","\u027a","l\u032a","l\u032a\u0329","l","l\u0329","\u026b","\u026b\u0329","\u026d","\u026d\u0329","\u028e","\u028e\u0329","\u029f","\u029f\u0329","w","\u0265","\u028b","\u0279","\u027b","j","\u0270","\u0298","\u01c2","\u01c0","!","\u01c1","\u02b0","\u02b1","\u02b7","\u02b8","\u02b2","\u02b3","\u207f","\u02e1","\u02b4","\u02b5","\u02e2","\u02e3","\u02e0","\u02b6","\u02e4","\u02c1","\u02c0","\u02bc","i","i\u032f","\u0129","y","y\u032f","\u1ef9","\u026a","\u026a\u032f","\u026a\u0303","\u028f","\u028f\u032f","\u028f\u0303","\u0268","\u0268\u032f","\u0268\u0303","\u0289","\u0289\u032f","\u0289\u0303","\u026f","\u026f\u032f","\u026f\u0303","u","u\u032f","\u0169","\u028a","\u028a\u032f","\u028a\u0303","e","e\u032f","\u1ebd","\u00f8","\u00f8\u032f","\u00f8\u0303","\u0258","\u0258\u032f","\u0258\u0303","\u0275","\u0275\u032f","\u0275\u0303","\u0264","\u0264\u032f","\u0264\u0303","o","o\u032f","\u00f5","\u025b","\u025b\u032f","\u025b\u0303","\u0153","\u0153\u032f","\u0153\u0303","\u025c","\u025c\u032f","\u025c\u0303","\u0259","\u0259\u032f","\u0259\u0303","\u025e","\u025e\u032f","\u025e\u0303","\u028c","\u028c\u032f","\u028c\u0303","\u0254","\u0254\u032f","\u0254\u0303","\u00e6","\u00e6\u032f","\u00e6\u0303","\u0276","\u0276\u032f","\u0276\u0303","a","a\u032f","\u00e3","\u0250","\u0250\u032f","\u0250\u0303","\u0251","\u0251\u032f","\u0251\u0303","\u0252","\u0252\u032f","\u0252\u0303","\u02c8","\u02cc","\u02d0","\u02d1","\u02d8",".","\u203f","|","\u2016"]},'symbols':{'labelMsg':'wikieditor-toolbar-characters-page-symbols','layout':'characters','characters':["~","|","\u00a1","\u00bf","\u2020","\u2021","\u2194","\u2191","\u2193","\u2022","\u00b6","#","\u00bd","\u2153","\u2154","\u00bc","\u00be","\u215b","\u215c","\u215d","\u215e","\u221e","\u2018","\u201e","\u201c","\u2019","\u201d",{'label':"\u00ab\u00bb",'action':{'type':'encapsulate','options':{'pre':"\u00ab",'post':"\u00bb"}}},"\u00a4","\u20b3","\u0e3f","\u20b5","\u00a2","\u20a1","\u20a2","$","\u20ab","\u20af","\u20ac","\u20a0","\u20a3","\u0192","\u20b4","\u20ad","\u20a4","\u2133","\u20a5","\u20a6","\u2116","\u20a7","\u20b0","\u00a3","\u17db","\u20a8","\u20aa","\u09f3","\u20ae","\u20a9","\u00a5","\u2660","\u2663","\u2665","\u2666","m\u00b2","m\u00b3","\u2013","\u2014","\u2026","\u2018","\u201c","\u2019","\u201d","\u00b0","\u2033","\u2032","\u2248","\u2260","\u2264","\u2265","\u00b1","\u2212","\u00d7","\u00f7","\u2190","\u2192","\u00b7","\u00a7"]},'greek':{'labelMsg':'wikieditor-toolbar-characters-page-greek','layout':'characters','language':'hl','characters':["\u0391","\u0386","\u03b1","\u03ac","\u0392","\u03b2","\u0393","\u03b3","\u0394","\u03b4","\u0395","\u0388","\u03b5","\u03ad","\u0396","\u03b6","\u0397","\u0389","\u03b7","\u03ae","\u0398","\u03b8","\u0399","\u038a","\u03b9","\u03af","\u039a","\u03ba","\u039b","\u03bb","\u039c","\u03bc","\u039d","\u03bd","\u039e","\u03be","\u039f","\u038c","\u03bf","\u03cc","\u03a0","\u03c0","\u03a1","\u03c1","\u03a3","\u03c3","\u03c2","\u03a4","\u03c4","\u03a5","\u038e","\u03c5","\u03cd","\u03a6","\u03c6","\u03a7","\u03c7","\u03a8","\u03c8","\u03a9","\u038f","\u03c9","\u03ce"]},'cyrillic':{'labelMsg':'wikieditor-toolbar-characters-page-cyrillic','layout':'characters','characters':["\u0410","\u0430","\u04d8","\u04d9","\u0411","\u0431","\u0412","\u0432","\u0413","\u0433","\u0490","\u0491","\u0403","\u0453","\u0492","\u0493","\u0414","\u0434","\u0402","\u0452","\u0415","\u0435","\u0404","\u0454","\u0401","\u0451","\u0416","\u0436","\u0417","\u0437","\u0405","\u0455","\u0418","\u0438","\u0406","\u0456","\u0407","\u0457","\u0130","\u0419","\u0439","\u04e2","\u04e3","\u0408","\u0458","\u041a","\u043a","\u040c","\u045c","\u049a","\u049b","\u041b","\u043b","\u0409","\u0459","\u041c","\u043c","\u041d","\u043d","\u040a","\u045a","\u04a2","\u04a3","\u041e","\u043e","\u04e8","\u04e9","\u041f","\u043f","\u0420","\u0440","\u0421","\u0441","\u0422","\u0442","\u040b","\u045b","\u0423","\u0443","\u040e","\u045e","\u04ee","\u04ef","\u04b0","\u04b1","\u04ae","\u04af","\u0424","\u0444","\u0425","\u0445","\u04b2","\u04b3","\u04ba","\u04bb","\u0426","\u0446","\u0427","\u0447","\u04b6","\u04b7","\u040f","\u045f","\u0428","\u0448","\u0429","\u0449","\u042a","\u044a","\u042b","\u044b","\u042c","\u044c","\u042d","\u044d","\u042e","\u044e","\u042f","\u044f"]},'arabic':{'labelMsg':'wikieditor-toolbar-characters-page-arabic','layout':'characters','language':'ar','direction':'rtl','characters':["\u061b","\u061f","\u0621","\u0622","\u0623","\u0624","\u0625","\u0626","\u0627","\u0628","\u0629","\u062a","\u062b","\u062c","\u062d","\u062e","\u062f","\u0630","\u0631","\u0632","\u0633","\u0634","\u0635","\u0636","\u0637","\u0638","\u0639","\u063a","\u0641","\u0642","\u0643","\u0644","\u0645","\u0646","\u0647","\u0648","\u0649","\u064a","\u060c","\u067e","\u0686","\u0698","\u06af","\u06ad"]},'hebrew':{'labelMsg':'wikieditor-toolbar-characters-page-hebrew','layout':'characters','direction':'rtl','characters':["\u05d0","\u05d1","\u05d2","\u05d3","\u05d4","\u05d5","\u05d6","\u05d7","\u05d8","\u05d9","\u05db","\u05da","\u05dc","\u05de","\u05dd","\u05e0","\u05df","\u05e1","\u05e2","\u05e4","\u05e3","\u05e6","\u05e5","\u05e7","\u05e8","\u05e9","\u05ea","\u05f3","\u05f4","\u05f0","\u05f1","\u05f2","\u05d0","\u05d3","\u05d4","\u05d5","\u05d6","\u05d7","\u05d8","\u05d9","\u05da","\u05db","\u05dc","\u05dd","\u05de","\u05df","\u05e0","\u05e1","\u05e2","\u05e3","\u05e4","\u05be","\u05f3","\u05f4",["\u05b0\u25cc","\u05b0"],["\u05b1\u25cc","\u05b1"],["\u05b2\u25cc","\u05b2"],["\u05b3\u25cc","\u05b3"],["\u05b4\u25cc","\u05b4"],["\u05b5\u25cc","\u05b5"],["\u05b6\u25cc","\u05b6"],["\u05b7\u25cc","\u05b7"],["\u05b8\u25cc","\u05b8"],["\u05b9\u25cc","\u05b9"],["\u05bb\u25cc","\u05bb"],["\u05bc\u25cc","\u05bc"],["\u05c1\u25cc","\u05c1"],["\u05c2\u25cc","\u05c2"],["\u05c7\u25cc","\u05c7"],["\u0591\u25cc","\u0591"],["\u0592\u25cc","\u0592"],["\u0593\u25cc","\u0593"],["\u0594\u25cc","\u0594"],["\u0595\u25cc","\u0595"],["\u0596\u25cc","\u0596"],["\u0597\u25cc","\u0597"],["\u0598\u25cc","\u0598"],["\u0599\u25cc","\u0599"],["\u059a\u25cc","\u059a"],["\u059b\u25cc","\u059b"],["\u059c\u25cc","\u059c"],["\u059d\u25cc","\u059d"],["\u059e\u25cc","\u059e"],["\u059f\u25cc","\u059f"],["\u05a0\u25cc","\u05a0"],["\u05a1\u25cc","\u05a1"],["\u05a2\u25cc","\u05a2"],["\u05a3\u25cc","\u05a3"],["\u05a4\u25cc","\u05a4"],["\u05a5\u25cc","\u05a5"],["\u05a6\u25cc","\u05a6"],["\u05a7\u25cc","\u05a7"],["\u05a8\u25cc","\u05a8"],["\u05a9\u25cc","\u05a9"],["\u05aa\u25cc","\u05aa"],["\u05ab\u25cc","\u05ab"],["\u05ac\u25cc","\u05ac"],["\u05ad\u25cc","\u05ad"],["\u05ae\u25cc","\u05ae"],["\u05af\u25cc","\u05af"],["\u05bf\u25cc","\u05bf"],["\u05c0\u25cc","\u05c0"],["\u05c3\u25cc","\u05c3"]]},'telugu':{'labelMsg':'wikieditor-toolbar-characters-page-telugu','language':'te','layout':'characters','characters':["\u0c01","\u0c02","\u0c03","\u0c05","\u0c06","\u0c07","\u0c08","\u0c09","\u0c0a","\u0c0b","\u0c60","\u0c0c","\u0c61","\u0c0e","\u0c0f","\u0c10","\u0c12","\u0c13","\u0c14","\u0c15","\u0c16","\u0c17","\u0c18","\u0c19","\u0c1a","\u0c1b","\u0c1c","\u0c1d","\u0c1e","\u0c1f","\u0c20","\u0c21","\u0c22","\u0c23","\u0c24","\u0c25","\u0c26","\u0c27","\u0c28","\u0c2a","\u0c2b","\u0c2c","\u0c2d","\u0c2e","\u0c2f","\u0c30","\u0c31","\u0c32","\u0c33","\u0c35","\u0c36","\u0c37","\u0c38","\u0c39","\u0c3e","\u0c3f","\u0c40","\u0c41","\u0c42","\u0c43","\u0c44","\u0c46","\u0c47","\u0c48","\u0c4a","\u0c4b","\u0c4c","\u0c4d","\u0c62","\u0c63","\u0c58","\u0c59","\u0c66","\u0c67","\u0c68","\u0c69","\u0c6a","\u0c6b","\u0c6c","\u0c6d","\u0c6e","\u0c6f","\u0c3d","\u0c78","\u0c79","\u0c7a","\u0c7b","\u0c7c","\u0c7d","\u0c7e","\u0c7f"]},'sinhala':{'labelMsg':'wikieditor-toolbar-characters-page-sinhala','language':'si','layout':'characters','characters':["\u0d85","\u0d86","\u0d87","\u0d88","\u0d89","\u0d8a","\u0d8b","\u0d8c","\u0d8d","\u0d8e","\u0d8f","\u0d90","\u0d91","\u0d92","\u0d93","\u0d94","\u0d95","\u0d96","\u0d9a","\u0d9b","\u0d9c","\u0d9d","\u0d9e","\u0d9f","\u0da0","\u0da1","\u0da2","\u0da3","\u0da4","\u0da5","\u0da6","\u0da7","\u0da8","\u0da9","\u0daa","\u0dab","\u0dac","\u0dad","\u0dae","\u0daf","\u0db0","\u0db1","\u0db3","\u0db4","\u0db5","\u0db6","\u0db7","\u0db8","\u0db9","\u0dba","\u0dbb","\u0dbd","\u0dc0","\u0dc1","\u0dc2","\u0dc3","\u0dc4","\u0dc5","\u0dc6",["\u25cc\u0dcf","\u0dcf"],["\u25cc\u0dd0","\u0dd0"],["\u25cc\u0dd1","\u0dd1"],["\u25cc\u0dd2","\u0dd2"],["\u25cc\u0dd3","\u0dd3"],["\u25cc\u0dd4","\u0dd4"],["\u25cc\u0dd6","\u0dd6"],["\u25cc\u0dd8","\u0dd8"],["\u25cc\u0df2","\u0df2"],["\u25cc\u0ddf","\u0ddf"],["\u25cc\u0df3","\u0df3"],["\u25cc\u0dd9","\u0dd9"],["\u25cc\u0dda","\u0dda"],["\u25cc\u0ddc","\u0ddc"],["\u25cc\u0ddd","\u0ddd"],["\u25cc\u0dde","\u0dde"],["\u25cc\u0dca","\u0dca"]]},'gujarati':{'labelMsg':'wikieditor-toolbar-characters-page-gujarati','language':'gu','layout':'characters','characters':["\u0ad0","\u0a85","\u0a86","\u0a87","\u0a88","\u0a89","\u0a8a","\u0a8b","\u0ae0","\u0a8c","\u0ae1","\u0a8d","\u0a8f","\u0a90","\u0a91","\u0a93","\u0a94","\u0a95","\u0a96","\u0a97","\u0a98","\u0a99","\u0a9a","\u0a9b","\u0a9c","\u0a9d","\u0a9e","\u0a9f","\u0aa0","\u0aa1","\u0aa2","\u0aa3","\u0aa4","\u0aa5","\u0aa6","\u0aa7","\u0aa8","\u0aaa","\u0aab","\u0aac","\u0aad","\u0aae","\u0aaf","\u0ab0","\u0ab2","\u0ab5","\u0ab6","\u0ab7","\u0ab8","\u0ab9","\u0ab3","\u0abd",["\u25cc\u0abe","\u0abe"],["\u25cc\u0abf","\u0abf"],["\u25cc\u0ac0","\u0ac0"],["\u25cc\u0ac1","\u0ac1"],["\u25cc\u0ac2","\u0ac2"],["\u25cc\u0ac3","\u0ac3"],["\u25cc\u0ac4","\u0ac4"],["\u25cc\u0ae2","\u0ae2"],["\u25cc\u0ae3","\u0ae3"],["\u25cc\u0ac5","\u0ac5"],["\u25cc\u0ac7","\u0ac7"],["\u25cc\u0ac8","\u0ac8"],["\u25cc\u0ac9","\u0ac9"],["\u25cc\u0acb","\u0acb"],["\u25cc\u0acc","\u0acc"],["\u25cc\u0acd","\u0acd"]]}}},'help':{labelMsg:'wikieditor-toolbar-section-help',type:'booklet',pages:{'format':{labelMsg:'wikieditor-toolbar-help-page-format',layout:'table',headings:[{textMsg:'wikieditor-toolbar-help-heading-description'},{textMsg:'wikieditor-toolbar-help-heading-syntax'},{textMsg:'wikieditor-toolbar-help-heading-result'}],rows:[{'description':{htmlMsg:'wikieditor-toolbar-help-content-italic-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-italic-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-italic-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-bold-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-bold-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-bold-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-bolditalic-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-bolditalic-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-bolditalic-result'}}]},'link':{labelMsg:'wikieditor-toolbar-help-page-link',layout:'table',headings:[{textMsg:'wikieditor-toolbar-help-heading-description'},{textMsg:'wikieditor-toolbar-help-heading-syntax'},{textMsg:'wikieditor-toolbar-help-heading-result'}],rows:[{'description':{htmlMsg:'wikieditor-toolbar-help-content-ilink-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-ilink-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-ilink-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-xlink-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-xlink-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-xlink-result'}}]},'heading':{labelMsg:'wikieditor-toolbar-help-page-heading',layout:'table',headings:[{textMsg:'wikieditor-toolbar-help-heading-description'},{textMsg:'wikieditor-toolbar-help-heading-syntax'},{textMsg:'wikieditor-toolbar-help-heading-result'}],rows:[{'description':{htmlMsg:'wikieditor-toolbar-help-content-heading1-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-heading1-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-heading1-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-heading2-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-heading2-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-heading2-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-heading3-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-heading3-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-heading3-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-heading4-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-heading4-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-heading4-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-heading5-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-heading5-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-heading5-result'}}]},'list':{labelMsg:'wikieditor-toolbar-help-page-list',layout:'table',headings:[{textMsg:'wikieditor-toolbar-help-heading-description'},{textMsg:'wikieditor-toolbar-help-heading-syntax'},{textMsg:'wikieditor-toolbar-help-heading-result'}],rows:[{'description':{htmlMsg:'wikieditor-toolbar-help-content-ulist-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-ulist-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-ulist-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-olist-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-olist-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-olist-result'}}]},'file':{labelMsg:'wikieditor-toolbar-help-page-file',layout:'table',headings:[{textMsg:'wikieditor-toolbar-help-heading-description'},{textMsg:'wikieditor-toolbar-help-heading-syntax'},{textMsg:'wikieditor-toolbar-help-heading-result'}],rows:[{'description':{htmlMsg:'wikieditor-toolbar-help-content-file-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-file-syntax'},'result':{htmlMsg:['wikieditor-toolbar-help-content-file-result',stylepath]}}]},'reference':{labelMsg:'wikieditor-toolbar-help-page-reference',layout:'table',headings:[{textMsg:'wikieditor-toolbar-help-heading-description'},{textMsg:'wikieditor-toolbar-help-heading-syntax'},{textMsg:'wikieditor-toolbar-help-heading-result'}],rows:[{'description':{htmlMsg:'wikieditor-toolbar-help-content-reference-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-reference-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-reference-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-rereference-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-rereference-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-rereference-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-showreferences-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-showreferences-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-showreferences-result'}}]},'discussion':{labelMsg:'wikieditor-toolbar-help-page-discussion',layout:'table',headings:[{textMsg:'wikieditor-toolbar-help-heading-description'},{textMsg:'wikieditor-toolbar-help-heading-syntax'},{textMsg:'wikieditor-toolbar-help-heading-result'}],rows:[{'description':{htmlMsg:'wikieditor-toolbar-help-content-signaturetimestamp-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-signaturetimestamp-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-signaturetimestamp-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-signature-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-signature-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-signature-result'}},{'description':{htmlMsg:'wikieditor-toolbar-help-content-indent-description'},'syntax':{htmlMsg:'wikieditor-toolbar-help-content-indent-syntax'},'result':{htmlMsg:'wikieditor-toolbar-help-content-indent-result'}}]}}}},'dialogs':{'insert-link':{titleMsg:'wikieditor-toolbar-tool-link-title',id:'wikieditor-toolbar-link-dialog',html:'\ |
10 | 10 | <fieldset>\ |
11 | 11 | <div class="wikieditor-toolbar-field-wrapper">\ |
12 | | - <label for="wikieditor-toolbar-link-int-target" rel="wikieditor-toolbar-tool-link-int-target"></label>\ |
13 | | - <div id="wikieditor-toolbar-link-int-target-status" style="display: inline; float:right;"></div>\ |
| 12 | + <label for="wikieditor-toolbar-link-int-target" rel="wikieditor-toolbar-tool-link-int-target" style="float:left;"></label>\ |
| 13 | + <div id="wikieditor-toolbar-link-int-target-status" style="float:right;"></div>\ |
14 | 14 | <input type="text" id="wikieditor-toolbar-link-int-target" style="width: 100%;" />\ |
15 | 15 | </div>\ |
16 | 16 | <div class="wikieditor-toolbar-field-wrapper">\ |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | $j('#wikieditor-toolbar-link-type-ext').attr('checked','checked');else |
50 | 50 | $j('#wikieditor-toolbar-link-type-int').attr('checked','checked');if($j('#wikieditor-toolbar-link-int-text').data('untouched')) |
51 | 51 | $j('#wikieditor-toolbar-link-int-text').val($j('#wikieditor-toolbar-link-int-target').val()).change();},0);});$j('#wikieditor-toolbar-link-int-text').bind('change keydown paste cut',function(){var oldVal=$j(this).val();var that=this;setTimeout(function(){if($j(that).val()!=oldVal) |
52 | | -$j(that).data('untouched',false);},0);});var existsMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-exists');var notexistsMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-notexists');var invalidMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-invalid');var externalMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-external');var loadingMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-loading');$j('#wikieditor-toolbar-link-int-target-status').append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-exists').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-exists.png')).append(existsMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-notexists').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-notexists.png')).append(notexistsMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-invalid').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-invalid.png')).append(invalidMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-external').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-external.png')).append(externalMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-loading').append($j('<img />').attr({'src':$j.wikiEditor.imgPath+'dialogs/'+'loading.gif','alt':loadingMsg,'title':loadingMsg}))).data('existencecache',{}).children().hide();$j('#wikieditor-toolbar-link-int-target').bind('keypress paste cut',function(){if(typeof $j(this).data('timerID')!='undefined'){clearTimeout($j(this).data('timerID'));} |
| 52 | +$j(that).data('untouched',false);},0);});var existsMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-exists');var notexistsMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-notexists');var invalidMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-invalid');var externalMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-external');var loadingMsg=u.getMsg('wikieditor-toolbar-tool-link-int-target-status-loading');$j('#wikieditor-toolbar-link-int-target-status').append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-exists').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-exists.png')).append(existsMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-notexists').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-notexists.png')).append(notexistsMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-invalid').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-invalid.png')).append(invalidMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-external').append($j('<img />').attr('src',$j.wikiEditor.imgPath+'dialogs/'+'insert-link-external.png')).append(externalMsg)).append($j('<div />').attr('id','wikieditor-toolbar-link-int-target-status-loading').append($j('<img />').attr({'src':$j.wikiEditor.imgPath+'dialogs/'+'loading.gif','alt':loadingMsg,'title':loadingMsg}))).data('existencecache',{}).children().hide();$j('#wikieditor-toolbar-link-int-target').bind('keyup paste cut',function(){if(typeof $j(this).data('timerID')!='undefined'){clearTimeout($j(this).data('timerID'));} |
53 | 53 | var timerID=setTimeout(updateExistence,120);$j(this).data('timerID',timerID);}).change(function(){if(typeof $j(this).data('timerID')!='undefined'){clearTimeout($j(this).data('timerID'));} |
54 | 54 | updateExistence();});$j('#wikieditor-toolbar-link-int-target').data('suggcache',{}).suggestions({fetch:function(query){var that=this;var title=$j(this).val();if(isExternalLink(title)||title.indexOf('|')!=-1||title==''){$j(this).suggestions('suggestions',[]);return;} |
55 | 55 | var cache=$j(this).data('suggcache');if(typeof cache[title]!='undefined'){$j(this).suggestions('suggestions',cache[title]);return;} |
— | — | @@ -177,5 +177,5 @@ |
178 | 178 | s=s.substr(index+match[i].length);var start=index+offset;var end=start+match[i].length;var newEnd=start+replaceStr.length;$textarea.textSelection('setSelection',{'start':start,'end':end}).textSelection('encapsulateSelection',{'peri':replaceStr,'replace':true}).textSelection('setSelection',{'start':start,'end':newEnd});offset=newEnd;} |
179 | 179 | $j('#wikieditor-toolbar-replace-success').text(u.getMsg('wikieditor-toolbar-tool-replace-success',match.length)).show();$j(this).data('offset',0);}else{var start=match.index+offset;var end=start+match[0].length;var newEnd=start+replaceStr.length;$textarea.textSelection('setSelection',{'start':start,'end':end});if(mode=='replace'){$textarea.textSelection('encapsulateSelection',{'peri':replaceStr,'replace':true}).textSelection('setSelection',{'start':start,'end':newEnd});} |
180 | 180 | $textarea.textSelection('scrollToCaretPosition');$j(this).data('offset',mode=='replace'?newEnd:end);}});},dialog:{width:500,dialogClass:'wikiEditor-toolbar-dialog',buttons:{'wikieditor-toolbar-tool-replace-button-findnext':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'find');},'wikieditor-toolbar-tool-replace-button-replacenext':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'replace');},'wikieditor-toolbar-tool-replace-button-replaceall':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'replaceAll');},'wikieditor-toolbar-tool-replace-close':function(){$j(this).dialog('close');}},open:function(){$j(this).data('offset',0);$j('#wikieditor-toolbar-replace-search').focus();$j('#wikieditor-toolbar-replace-nomatch, #wikieditor-toolbar-replace-success, #wikieditor-toolbar-replace-emptysearch, #wikieditor-toolbar-replace-invalidregex').hide();if(!($j(this).data('onetimeonlystuff'))){$j(this).data('onetimeonlystuff',true);$j(this).closest('.ui-dialog').keypress(function(e){if((e.keyCode||e.which)==13){var button=$j(this).data('dialogaction')||$j(this).find('button:first');button.click();e.preventDefault();}});$j(this).closest('.ui-dialog').find('button').focus(function(){$j(this).closest('.ui-dialog').data('dialogaction',this);});} |
181 | | -var dialog=$j(this).closest('.ui-dialog');var that=this;$j($j(this).data('context').$iframe[0].contentWindow.document).bind('keypress.srdialog',function(e){if((e.keyCode||e.which)==13){var button=dialog.data('dialogaction')||dialog.find('button:first');button.click();e.preventDefault();}else if((e.keyCode||e.which)==27){$j(that).dialog('close');}});},close:function(){$j($j(this).data('context').$iframe[0].contentWindow.document).unbind('keypress.srdialog');$j(this).data('context').$iframe[0].contentWindow.focus();$j(this).closest('.ui-dialog').data('dialogaction',false);}}}}});}});$j(document).ready(function(){if(!wgWikiEditorEnabledModules.templateEditor){return true;} |
| 181 | +var dialog=$j(this).closest('.ui-dialog');var that=this;$j($j(this).data('context').$iframe[0].contentWindow.document).bind('keypress.srdialog',function(e){if((e.keyCode||e.which)==13){var button=dialog.data('dialogaction')||dialog.find('button:first');button.click();e.preventDefault();}else if((e.keyCode||e.which)==27){$j(that).dialog('close');}});},close:function(){$j($j(this).data('context').$iframe[0].contentWindow.document).unbind('keypress.srdialog');$j(this).closest('.ui-dialog').data('dialogaction',false);}}}}});}});$j(document).ready(function(){if(!wgWikiEditorEnabledModules.templateEditor){return true;} |
182 | 182 | if($j.fn.wikiEditor){$j('textarea#wpTextbox1').wikiEditor('addModule','templateEditor');}}); |
\ No newline at end of file |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -845,8 +845,8 @@ |
846 | 846 | html: '\ |
847 | 847 | <fieldset>\ |
848 | 848 | <div class="wikieditor-toolbar-field-wrapper">\ |
849 | | - <label for="wikieditor-toolbar-link-int-target" rel="wikieditor-toolbar-tool-link-int-target"></label>\ |
850 | | - <div id="wikieditor-toolbar-link-int-target-status" style="display: inline; float:right;"></div>\ |
| 849 | + <label for="wikieditor-toolbar-link-int-target" rel="wikieditor-toolbar-tool-link-int-target" style="float:left;"></label>\ |
| 850 | + <div id="wikieditor-toolbar-link-int-target-status" style="float:right;"></div>\ |
851 | 851 | <input type="text" id="wikieditor-toolbar-link-int-target" style="width: 100%;" />\ |
852 | 852 | </div>\ |
853 | 853 | <div class="wikieditor-toolbar-field-wrapper">\ |
— | — | @@ -1069,7 +1069,7 @@ |
1070 | 1070 | .children().hide(); |
1071 | 1071 | |
1072 | 1072 | $j( '#wikieditor-toolbar-link-int-target' ) |
1073 | | - .bind( 'keypress paste cut', function() { |
| 1073 | + .bind( 'keyup paste cut', function() { |
1074 | 1074 | // Cancel the running timer if applicable |
1075 | 1075 | if ( typeof $j(this).data( 'timerID' ) != 'undefined' ) { |
1076 | 1076 | clearTimeout( $j(this).data( 'timerID' ) ); |
— | — | @@ -1702,7 +1702,6 @@ |
1703 | 1703 | close: function() { |
1704 | 1704 | $j( $j(this).data( 'context' ).$iframe[0].contentWindow.document ) |
1705 | 1705 | .unbind( 'keypress.srdialog' ); |
1706 | | - $j(this).data( 'context' ).$iframe[0].contentWindow.focus(); |
1707 | 1706 | $j(this).closest( '.ui-dialog' ).data( 'dialogaction', false ); |
1708 | 1707 | } |
1709 | 1708 | } |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/WikiEditor/Modules/Toolbar/Toolbar.i18n.php |
— | — | @@ -3377,6 +3377,7 @@ |
3378 | 3378 | * @author Geraki |
3379 | 3379 | * @author Omnipaedista |
3380 | 3380 | * @author ZaDiak |
| 3381 | + * @author Περίεργος |
3381 | 3382 | */ |
3382 | 3383 | $messages['el'] = array( |
3383 | 3384 | 'wikieditor-toolbar' => 'Επεξεργασία εργαλειοθήκης', |
— | — | @@ -3397,6 +3398,7 @@ |
3398 | 3399 | 'wikieditor-toolbar-tool-link-int-target' => 'Τίτλος άρθρου:', |
3399 | 3400 | 'wikieditor-toolbar-tool-link-int-target-tooltip' => 'Εισάγετε τον τίτλο της σελίδας', |
3400 | 3401 | 'wikieditor-toolbar-tool-link-int-text' => 'Κείμενο συνδέσμου:', |
| 3402 | + 'wikieditor-toolbar-tool-link-int-text-tooltip' => 'Κείμενο προς εμφάνιση', |
3401 | 3403 | 'wikieditor-toolbar-tool-link-ext' => 'Σε μία εξωτερική ιστοσελίδα', |
3402 | 3404 | 'wikieditor-toolbar-tool-link-ext-target' => 'Σύνδεσμος URL:', |
3403 | 3405 | 'wikieditor-toolbar-tool-link-ext-text' => 'Κείμενο συνδέσμου:', |
— | — | @@ -3408,6 +3410,7 @@ |
3409 | 3411 | 'wikieditor-toolbar-tool-link-int-target-status-external' => 'Εξωτερικός σύνδεσμος', |
3410 | 3412 | 'wikieditor-toolbar-tool-link-int-target-status-loading' => 'Έλεγχος ύπαρξης σελίδας...', |
3411 | 3413 | 'wikieditor-toolbar-tool-link-int-invalid' => 'Ο τίτλος που καθορίσατε είναι μη έγκυρος.', |
| 3414 | + 'wikieditor-toolbar-tool-link-lookslikeinternal' => 'Η διεύθυνση URL που ορίσατε φαίνεται πως προορίζεται για σύνδεσμο σε σελίδα σε άλλο βίκι. Θέλετε να τη μετατρέψετε σε εσωτερικό σύνδεσμο;', |
3412 | 3415 | 'wikieditor-toolbar-tool-link-lookslikeinternal-int' => 'Εσωτερικός σύνδεσμος', |
3413 | 3416 | 'wikieditor-toolbar-tool-link-lookslikeinternal-ext' => 'Εξωτερικός σύνδεσμος', |
3414 | 3417 | 'wikieditor-toolbar-tool-link-empty' => 'Δεν εισάγατε τίποτα για σύνδεση σε αυτό.', |
— | — | @@ -4168,7 +4171,7 @@ |
4169 | 4172 | 'wikieditor-toolbar-tool-ilink' => 'Barne lotura', |
4170 | 4173 | 'wikieditor-toolbar-tool-ilink-example' => 'Loturaren izenburua', |
4171 | 4174 | 'wikieditor-toolbar-tool-xlink' => 'Kanpo lotura (gogoratu http:// aurrizkia)', |
4172 | | - 'wikieditor-toolbar-tool-xlink-example' => 'http://www.adibidea.com lotura izenburua', |
| 4175 | + 'wikieditor-toolbar-tool-xlink-example' => 'http://www.adibidea.com loturaren izenburua', |
4173 | 4176 | 'wikieditor-toolbar-tool-link' => 'Lotura', |
4174 | 4177 | 'wikieditor-toolbar-tool-link-title' => 'Sartu lotura', |
4175 | 4178 | 'wikieditor-toolbar-tool-link-int' => 'Wiki orrialde batera', |
— | — | @@ -4189,24 +4192,26 @@ |
4190 | 4193 | 'wikieditor-toolbar-tool-link-int-invalid' => 'Zehaztutako izenburua ez dago zuzen.', |
4191 | 4194 | 'wikieditor-toolbar-tool-link-lookslikeinternal-int' => 'Barne lotura', |
4192 | 4195 | 'wikieditor-toolbar-tool-link-lookslikeinternal-ext' => 'Kanpo lotura', |
4193 | | - 'wikieditor-toolbar-tool-file' => 'Txertatutako fitxategia', |
| 4196 | + 'wikieditor-toolbar-tool-file' => 'Fitxategia txertatu', |
4194 | 4197 | 'wikieditor-toolbar-tool-file-example' => 'Adibidea.jpg', |
4195 | 4198 | 'wikieditor-toolbar-tool-reference' => 'Erreferentzia', |
4196 | 4199 | 'wikieditor-toolbar-tool-reference-example' => 'Txertatu testu oina hemen', |
4197 | 4200 | 'wikieditor-toolbar-tool-signature' => 'Sinadura data eta orduarekin', |
4198 | 4201 | 'wikieditor-toolbar-section-advanced' => 'Aurreratua', |
4199 | 4202 | 'wikieditor-toolbar-tool-heading' => 'Izenburua', |
4200 | | - 'wikieditor-toolbar-tool-heading-1' => '1. Maila', |
4201 | | - 'wikieditor-toolbar-tool-heading-2' => '2. Maila', |
4202 | | - 'wikieditor-toolbar-tool-heading-3' => '3. Maila', |
4203 | | - 'wikieditor-toolbar-tool-heading-4' => '4. Maila', |
4204 | | - 'wikieditor-toolbar-tool-heading-5' => '5. Maila', |
4205 | | - 'wikieditor-toolbar-tool-heading-example' => 'Izenburuaren testua', |
| 4203 | + 'wikieditor-toolbar-tool-heading-1' => '1. maila', |
| 4204 | + 'wikieditor-toolbar-tool-heading-2' => '2. maila', |
| 4205 | + 'wikieditor-toolbar-tool-heading-3' => '3. maila', |
| 4206 | + 'wikieditor-toolbar-tool-heading-4' => '4. maila', |
| 4207 | + 'wikieditor-toolbar-tool-heading-5' => '5. maila', |
| 4208 | + 'wikieditor-toolbar-tool-heading-example' => ' Izenburuaren testua ', |
4206 | 4209 | 'wikieditor-toolbar-group-list' => 'Zerrenda', |
4207 | 4210 | 'wikieditor-toolbar-tool-ulist' => 'Puntudun zerrenda', |
4208 | | - 'wikieditor-toolbar-tool-ulist-example' => 'Puntudun zerrendako gai', |
| 4211 | + 'wikieditor-toolbar-tool-ulist-example' => 'Puntudun zerrendako elementua', |
4209 | 4212 | 'wikieditor-toolbar-tool-olist' => 'Zenbakidun zerrenda', |
4210 | | - 'wikieditor-toolbar-tool-olist-example' => 'Zenbakidun zerrendako gai', |
| 4213 | + 'wikieditor-toolbar-tool-olist-example' => 'Zenbakidun zerrendako elementua', |
| 4214 | + 'wikieditor-toolbar-tool-indent' => 'Koska', |
| 4215 | + 'wikieditor-toolbar-tool-indent-example' => 'Koskadun lerroa', |
4211 | 4216 | 'wikieditor-toolbar-group-size' => 'Tamaina', |
4212 | 4217 | 'wikieditor-toolbar-tool-big' => 'Handia', |
4213 | 4218 | 'wikieditor-toolbar-tool-big-example' => 'Testu handia', |
— | — | @@ -4308,20 +4313,20 @@ |
4309 | 4314 | 'wikieditor-toolbar-help-content-heading5-description' => '5. mailako izenburua', |
4310 | 4315 | 'wikieditor-toolbar-help-content-heading5-syntax' => '===== Izenburuaren testua =====', |
4311 | 4316 | 'wikieditor-toolbar-help-content-heading5-result' => '<h5>Izenburuaren testua</h5>', |
4312 | | - 'wikieditor-toolbar-help-content-ulist-description' => 'Buletdun zerrenda', |
4313 | | - 'wikieditor-toolbar-help-content-ulist-syntax' => '* Zerrendako gai<br />* Zerrendako gai', |
4314 | | - 'wikieditor-toolbar-help-content-ulist-result' => '<ul><li>Zerrendako gai</li><li>Zerrendako gai</li></ul>', |
| 4317 | + 'wikieditor-toolbar-help-content-ulist-description' => 'Puntudun zerrenda', |
| 4318 | + 'wikieditor-toolbar-help-content-ulist-syntax' => '* Zerrendako elementua<br />* Zerrendako elementua', |
| 4319 | + 'wikieditor-toolbar-help-content-ulist-result' => '<ul><li>Zerrendako elementua</li><li>Zerrendako elementua</li></ul>', |
4315 | 4320 | 'wikieditor-toolbar-help-content-olist-description' => 'Zenbakidun zerrenda', |
4316 | | - 'wikieditor-toolbar-help-content-olist-syntax' => '# Zerrendako gai<br /># Zerrendako gai', |
4317 | | - 'wikieditor-toolbar-help-content-olist-result' => '<ol><li>Zerrendako gai</li><li>Zerrendako gai</li></ol>', |
4318 | | - 'wikieditor-toolbar-help-content-file-description' => 'Txertatutako fitxategia', |
4319 | | - 'wikieditor-toolbar-help-content-file-syntax' => '[[{{ns:file}}:Adibidea.png|thumb|Oinaren testua]]', |
4320 | | - 'wikieditor-toolbar-help-content-file-result' => "<div style='width:104px;' class='thumbinner'><a title='Irudiaren testua' class='image' href='#'><img height='50' width='100' border='0' class='thumbimage' src='extensions/UsabilityInitiative/images/wikiEditor/toolbar/example-image.png' alt=''/></a><div class='thumbcaption'><div class='magnify'><a title='Handitu' class='internal' href='#'><img height='11' width='15' alt='' src='$1/common/images/magnify-clip.png'/></a></div>Irudiaren testua</div></div>", |
| 4321 | + 'wikieditor-toolbar-help-content-olist-syntax' => '# Zerrendako elementua<br /># Zerrendako elementua', |
| 4322 | + 'wikieditor-toolbar-help-content-olist-result' => '<ol><li>Zerrendako elementua</li><li>Zerrendako elementua</li></ol>', |
| 4323 | + 'wikieditor-toolbar-help-content-file-description' => 'Fitxategia txertatu', |
| 4324 | + 'wikieditor-toolbar-help-content-file-syntax' => '[[{{ns:file}}:Adibidea.png|thumb|Irudi oina]]', |
| 4325 | + 'wikieditor-toolbar-help-content-file-result' => "<div style='width:104px;' class='thumbinner'><a title='Irudiaren testua' class='image' href='#'><img height='50' width='100' border='0' class='thumbimage' src='extensions/UsabilityInitiative/images/wikiEditor/toolbar/example-image.png' alt=''/></a><div class='thumbcaption'><div class='magnify'><a title='Handitu' class='internal' href='#'><img height='11' width='15' alt='' src='$1/common/images/magnify-clip.png'/></a></div>Irudi oina</div></div>", |
4321 | 4326 | 'wikieditor-toolbar-help-content-reference-description' => 'Erreferentzia', |
4322 | | - 'wikieditor-toolbar-help-content-reference-syntax' => 'Orrialdearen testua.<ref name="test">[http://www.adibidea.org Loturaren testua], testu gehigarria.</ref>', |
| 4327 | + 'wikieditor-toolbar-help-content-reference-syntax' => 'Orrialdearen testua.<ref name="proba">[http://www.adibidea.org Loturaren testua], testu gehigarria.</ref>', |
4323 | 4328 | 'wikieditor-toolbar-help-content-reference-result' => "Orrialdearen testua.<sup><a href='#'>[1]</a></sup>", |
4324 | 4329 | 'wikieditor-toolbar-help-content-rereference-description' => 'Erreferentzia beraren erabilera gehiago', |
4325 | | - 'wikieditor-toolbar-help-content-rereference-result' => "Orriaren testua.<sup><a href='#'>[1]</a></sup>", |
| 4330 | + 'wikieditor-toolbar-help-content-rereference-result' => "Orrialdearen testua.<sup><a href='#'>[1]</a></sup>", |
4326 | 4331 | 'wikieditor-toolbar-help-content-showreferences-description' => 'Erreferentziak erakutsi', |
4327 | 4332 | 'wikieditor-toolbar-help-content-showreferences-result' => "<ol class='references'><li id='cite_note-test-0'><b><a title='' href='#'>^</a></b> <a rel='nofollow' title='http://www.adibidea.org' class='external text' href='#'>Loturaren testua</a>, testu gehigarria.</li></ol>", |
4328 | 4333 | 'wikieditor-toolbar-help-content-signaturetimestamp-description' => 'Sindaura data eta orduarekin', |
— | — | @@ -4329,7 +4334,7 @@ |
4330 | 4335 | 'wikieditor-toolbar-help-content-signature-description' => 'Sinadura', |
4331 | 4336 | 'wikieditor-toolbar-help-content-signature-result' => "<a href='#' title='{{#special:mypage}}'>Lankide izena</a> (<a href='#' title='{{#special:mytalk}}'>eztabaida</a>)", |
4332 | 4337 | 'wikieditor-toolbar-help-content-indent-description' => 'Koska', |
4333 | | - 'wikieditor-toolbar-help-content-indent-syntax' => 'Testu normala<br />:Koskadun testua<br />::Koskadun testua', |
| 4338 | + 'wikieditor-toolbar-help-content-indent-syntax' => 'Testu normala<br />: Koskatutako testua<br />:: Koskatutako testua', |
4334 | 4339 | 'wikieditor-toolbar-help-content-indent-result' => 'Testu arrunta<dl><dd>Koskatutako testua<dl><dd>Koskatutako testua</dd></dl></dd></dl>', |
4335 | 4340 | ); |
4336 | 4341 | |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins/jquery.textSelection.js |
— | — | @@ -368,9 +368,18 @@ |
369 | 369 | } |
370 | 370 | var context = $(this).data( 'wikiEditor-context' ); |
371 | 371 | var hasIframe = context !== undefined && context.$iframe !== undefined; |
372 | | - // iframe functions have not been implemented yet, this is a temp hack |
373 | | - //var hasIframe = false; |
374 | | - return ( hasIframe ? context.fn : fn )[command].call( this, options ); |
| 372 | + |
| 373 | + // IE selection restore voodoo |
| 374 | + var needSave = false; |
| 375 | + if ( hasIframe && context.savedSelection !== null ) { |
| 376 | + context.fn.restoreSelection(); |
| 377 | + needSave = true; |
| 378 | + } |
| 379 | + retval = ( hasIframe ? context.fn : fn )[command].call( this, options ); |
| 380 | + if ( hasIframe && needSave ) { |
| 381 | + context.fn.saveSelection(); |
| 382 | + } |
| 383 | + return retval; |
375 | 384 | }; |
376 | 385 | |
377 | 386 | } )( jQuery ); |
\ No newline at end of file |
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins/jquery.textSelection.js |
___________________________________________________________________ |
Modified: svn:mergeinfo |
378 | 387 | Merged /trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js:r61829-61918 |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins/jquery.wikiEditor.dialogs.js |
— | — | @@ -77,6 +77,9 @@ |
78 | 78 | $.wikiEditor.modules.dialogs.fn.resize ); |
79 | 79 | }); |
80 | 80 | } |
| 81 | + dialogDiv.bind( 'dialogclose', function() { |
| 82 | + context.fn.restoreSelection(); |
| 83 | + } ); |
81 | 84 | // Add tabindexes to dialog form elements |
82 | 85 | // Find the highest tabindex in use |
83 | 86 | var maxTI = 0; |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins/jquery.wikiEditor.templateEditor.js |
— | — | @@ -94,43 +94,53 @@ |
95 | 95 | return; |
96 | 96 | } |
97 | 97 | // Build a model for this |
| 98 | + var model = new $.wikiEditor.modules.templateEditor.fn.model( $( this ).text() ); |
98 | 99 | |
99 | | - var model = new $.wikiEditor.modules.templateEditor.fn.model( $( this ).text() ); |
| 100 | + //check if model is collapsible |
100 | 101 | if ( !model.isCollapsible() ) { |
101 | 102 | return; |
102 | 103 | } |
| 104 | + |
103 | 105 | var $template = $( this ) |
104 | 106 | .wrap( '<div class="wikiEditor-template"></div>' ) |
105 | 107 | .addClass( 'wikiEditor-template-text wikiEditor-nodisplay' ) |
106 | | - .html( |
107 | | - // Wrap the start and end of the wikitext in spans so we can bind events to them |
108 | | - $( this ).html() |
109 | | - .replace( /\{\{/, '<span class="wikiEditor-template-start">{{</span><span class="wikiEditor-template-inner-text">' ) |
110 | | - .replace( /\}\}$/, '</span><span class="wikiEditor-template-end">}}</span>' ) ) //grab the *last* {{ |
111 | | - .css( 'visibility', 'hidden' ) |
112 | 108 | .parent() |
113 | 109 | .addClass( 'wikiEditor-template-collapsed' ) |
114 | 110 | .data( 'model', model ); |
| 111 | + |
115 | 112 | $( '<span />' ) |
116 | | - .addClass( 'wikiEditor-template-name wikiEditor-noinclude' ) |
117 | | - .text( model.getName() ) |
118 | | - .mousedown( noEdit ) |
119 | | - .prependTo( $template ); |
120 | | - $template.find( '.wikiEditor-template-end, .wikiEditor-template-start' ).mousedown( toggleWikiText ); |
| 113 | + .addClass( 'wikiEditor-template-name wikiEditor-noinclude' ) |
| 114 | + .text( model.getName() ) |
| 115 | + .mousedown( function(){createDialog( $template );} ) //have to pass template so model stays in sync |
| 116 | + .prependTo( $template ); |
| 117 | + |
| 118 | + |
121 | 119 | var $options = $( '<ul />' ) |
122 | | - .addClass( 'wikiEditor-template-modes wikiEditor-noinclude' ) |
123 | | - .append( $( '<li />' ) |
124 | | - .addClass( 'wikiEditor-template-action-wikiText' ) |
125 | | - .append( $( '<img />' ).attr( 'src', |
126 | | - $.wikiEditor.imgPath + 'templateEditor/' + 'wiki-text.png' ) ) |
127 | | - .mousedown( toggleWikiText ) ) |
128 | | - .insertAfter( $template.find( '.wikiEditor-template-name' ) ); |
129 | | - $options.append( |
130 | | - $( '<li />' ) |
131 | | - .addClass( 'wikiEditor-template-action-form' ) |
132 | | - .append( $( '<span>F</span>' ) ) |
133 | | - .mousedown( function(){createDialog($template); return false;} )); |
| 120 | + .addClass( 'wikiEditor-template-modes wikiEditor-noinclude' ) |
| 121 | + .append( $( '<li />' ) |
| 122 | + .addClass( 'wikiEditor-template-action-wikiText' ) |
| 123 | + .append( $( '<img />' ).attr( 'src', |
| 124 | + $.wikiEditor.imgPath + 'templateEditor/' + 'wiki-text.png' ) ) |
| 125 | + .mousedown( toggleWikiTextEditor ) ) |
| 126 | + .insertAfter( $template.find( '.wikiEditor-template-name' ) ); |
134 | 127 | |
| 128 | + function toggleWikiTextEditor(){ |
| 129 | + var $template = $( this ).closest( '.wikiEditor-template' ); |
| 130 | + $template |
| 131 | + .toggleClass( 'wikiEditor-template-expanded' ) |
| 132 | + .toggleClass( 'wikiEditor-template-collapsed' ); |
| 133 | + var $wikitext = $template.children('.wikiEditor-template-text'); |
| 134 | + $wikitext.toggleClass('wikiEditor-nodisplay'); |
| 135 | + |
| 136 | + //if we just collapsed this |
| 137 | + if( $template.hasClass('wikiEditor-template-collapsed') ) { |
| 138 | + var model = new $.wikiEditor.modules.templateEditor.fn.model( $template.children( '.wikiEditor-template-text' ).text() ); |
| 139 | + $template.data( 'model' , model ); |
| 140 | + $template.children( '.wikiEditor-template-name' ).text( model.getName() ); |
| 141 | + } |
| 142 | + |
| 143 | + return false; |
| 144 | + }; |
135 | 145 | |
136 | 146 | // Expand |
137 | 147 | function expandTemplate( $displayDiv ) { |
— | — | @@ -171,6 +181,7 @@ |
172 | 182 | |
173 | 183 | function createDialog( $templateDiv ){ |
174 | 184 | var templateModel = $templateDiv.data('model'); |
| 185 | + console.log(templateModel.getText()); |
175 | 186 | var $dialog = $("<div></div>"); |
176 | 187 | var $title = $("<div>" + templateModel.getName() + "</div>").addClass('wikiEditor-template-dialog-title'); |
177 | 188 | var $table = $("<table></table>") |
— | — | @@ -203,9 +214,12 @@ |
204 | 215 | |
205 | 216 | }).text("OK").appendTo($dialog); |
206 | 217 | $dialog.dialog(); //opens dialog |
| 218 | + return false; |
207 | 219 | }; |
208 | 220 | |
209 | 221 | |
| 222 | + |
| 223 | + |
210 | 224 | function toggleWikiText( ) { |
211 | 225 | var $template = $( this ).closest( '.wikiEditor-template' ); |
212 | 226 | $template |
— | — | @@ -231,9 +245,11 @@ |
232 | 246 | } |
233 | 247 | return false; |
234 | 248 | } |
235 | | - function noEdit() { |
236 | | - return false; |
237 | | - } |
| 249 | + |
| 250 | + function noEdit() { |
| 251 | + return false; |
| 252 | + } |
| 253 | + |
238 | 254 | }); |
239 | 255 | |
240 | 256 | }, |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins/jquery.wikiEditor.html |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | padding-left: 4em; |
41 | 41 | } |
42 | 42 | /* A collapsed template */ |
43 | | - .wikiEditor-template-collapsed { |
| 43 | + .wikiEditor-template-name { |
44 | 44 | background-color:#DDEEFF; |
45 | 45 | border:1px outset #DDEEFF; |
46 | 46 | color:#333333; |
— | — | @@ -73,7 +73,7 @@ |
74 | 74 | display: inline; |
75 | 75 | } |
76 | 76 | .wikiEditor-template-text{ |
77 | | - display: inline; |
| 77 | + border: solid 1px blue; |
78 | 78 | } |
79 | 79 | .wikiEditor-template-end, .wikiEditor-template-start{ |
80 | 80 | color: blue; |
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins/jquery.cookie.js |
___________________________________________________________________ |
Modified: svn:mergeinfo |
81 | 81 | Merged /trunk/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js:r61829-61918 |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins/jquery.wikiEditor.js |
— | — | @@ -205,7 +205,9 @@ |
206 | 206 | // The previous HTML of the iframe, stored to detect whether something really changed. |
207 | 207 | 'oldHTML': null, |
208 | 208 | // Same for delayedChange() |
209 | | - 'oldDelayedHTML': null |
| 209 | + 'oldDelayedHTML': null, |
| 210 | + // Saved selection state for IE |
| 211 | + 'savedSelection': null |
210 | 212 | }; |
211 | 213 | |
212 | 214 | /* |
— | — | @@ -486,7 +488,7 @@ |
487 | 489 | // to get a reliable answer. IE7 does get this right though |
488 | 490 | // Run this fix for all IE versions anyway, it doesn't hurt |
489 | 491 | retval = context.fn.htmlToText( retval.htmlText ); |
490 | | - } else if ( retval.toString ) { |
| 492 | + } else if ( typeof retval.toString != 'undefined' ) { |
491 | 493 | retval = retval.toString(); |
492 | 494 | } |
493 | 495 | return retval; |
— | — | @@ -991,6 +993,22 @@ |
992 | 994 | } |
993 | 995 | t = nextT; |
994 | 996 | } |
| 997 | + }, |
| 998 | + 'saveSelection': function() { |
| 999 | + if ( !$.browser.msie ) { |
| 1000 | + // Only IE needs this |
| 1001 | + return; |
| 1002 | + } |
| 1003 | + context.$iframe[0].contentWindow.focus(); |
| 1004 | + context.savedSelection = context.$iframe[0].contentWindow.document.selection.createRange(); |
| 1005 | + }, |
| 1006 | + 'restoreSelection': function() { |
| 1007 | + if ( !$.browser.msie || context.savedSelection === null ) { |
| 1008 | + return; |
| 1009 | + } |
| 1010 | + context.$iframe[0].contentWindow.focus(); |
| 1011 | + context.savedSelection.select(); |
| 1012 | + context.savedSelection = null; |
995 | 1013 | } |
996 | 1014 | }; |
997 | 1015 | |
— | — | @@ -1136,7 +1154,9 @@ |
1137 | 1155 | context.fallbackWindowOnBeforeUnload = window.onbeforeunload; |
1138 | 1156 | window.onbeforeunload = function() { |
1139 | 1157 | context.$textarea.val( context.$textarea.textSelection( 'getContents' ) ); |
1140 | | - return context.fallbackWindowOnBeforeUnload ? context.fallbackWindowOnBeforeUnload() : null; |
| 1158 | + if ( context.fallbackWindowOnBeforeUnload ) { |
| 1159 | + return context.fallbackWindowOnBeforeUnload(); |
| 1160 | + } |
1141 | 1161 | }; |
1142 | 1162 | } |
1143 | 1163 | |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins/jquery.wikiEditor.toolbar.js |
— | — | @@ -257,6 +257,7 @@ |
258 | 258 | } |
259 | 259 | break; |
260 | 260 | case 'dialog': |
| 261 | + context.fn.saveSelection(); |
261 | 262 | context.$textarea.wikiEditor( 'openDialog', action.module ); |
262 | 263 | break; |
263 | 264 | default: break; |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins.combined.js |
— | — | @@ -6417,9 +6417,18 @@ |
6418 | 6418 | } |
6419 | 6419 | var context = $(this).data( 'wikiEditor-context' ); |
6420 | 6420 | var hasIframe = context !== undefined && context.$iframe !== undefined; |
6421 | | - // iframe functions have not been implemented yet, this is a temp hack |
6422 | | - //var hasIframe = false; |
6423 | | - return ( hasIframe ? context.fn : fn )[command].call( this, options ); |
| 6421 | + |
| 6422 | + // IE selection restore voodoo |
| 6423 | + var needSave = false; |
| 6424 | + if ( hasIframe && context.savedSelection !== null ) { |
| 6425 | + context.fn.restoreSelection(); |
| 6426 | + needSave = true; |
| 6427 | + } |
| 6428 | + retval = ( hasIframe ? context.fn : fn )[command].call( this, options ); |
| 6429 | + if ( hasIframe && needSave ) { |
| 6430 | + context.fn.saveSelection(); |
| 6431 | + } |
| 6432 | + return retval; |
6424 | 6433 | }; |
6425 | 6434 | |
6426 | 6435 | } )( jQuery );/** |
— | — | @@ -6629,7 +6638,9 @@ |
6630 | 6639 | // The previous HTML of the iframe, stored to detect whether something really changed. |
6631 | 6640 | 'oldHTML': null, |
6632 | 6641 | // Same for delayedChange() |
6633 | | - 'oldDelayedHTML': null |
| 6642 | + 'oldDelayedHTML': null, |
| 6643 | + // Saved selection state for IE |
| 6644 | + 'savedSelection': null |
6634 | 6645 | }; |
6635 | 6646 | |
6636 | 6647 | /* |
— | — | @@ -6910,7 +6921,7 @@ |
6911 | 6922 | // to get a reliable answer. IE7 does get this right though |
6912 | 6923 | // Run this fix for all IE versions anyway, it doesn't hurt |
6913 | 6924 | retval = context.fn.htmlToText( retval.htmlText ); |
6914 | | - } else if ( retval.toString ) { |
| 6925 | + } else if ( typeof retval.toString != 'undefined' ) { |
6915 | 6926 | retval = retval.toString(); |
6916 | 6927 | } |
6917 | 6928 | return retval; |
— | — | @@ -7415,6 +7426,22 @@ |
7416 | 7427 | } |
7417 | 7428 | t = nextT; |
7418 | 7429 | } |
| 7430 | + }, |
| 7431 | + 'saveSelection': function() { |
| 7432 | + if ( !$.browser.msie ) { |
| 7433 | + // Only IE needs this |
| 7434 | + return; |
| 7435 | + } |
| 7436 | + context.$iframe[0].contentWindow.focus(); |
| 7437 | + context.savedSelection = context.$iframe[0].contentWindow.document.selection.createRange(); |
| 7438 | + }, |
| 7439 | + 'restoreSelection': function() { |
| 7440 | + if ( !$.browser.msie || context.savedSelection === null ) { |
| 7441 | + return; |
| 7442 | + } |
| 7443 | + context.$iframe[0].contentWindow.focus(); |
| 7444 | + context.savedSelection.select(); |
| 7445 | + context.savedSelection = null; |
7419 | 7446 | } |
7420 | 7447 | }; |
7421 | 7448 | |
— | — | @@ -7560,7 +7587,9 @@ |
7561 | 7588 | context.fallbackWindowOnBeforeUnload = window.onbeforeunload; |
7562 | 7589 | window.onbeforeunload = function() { |
7563 | 7590 | context.$textarea.val( context.$textarea.textSelection( 'getContents' ) ); |
7564 | | - return context.fallbackWindowOnBeforeUnload ? context.fallbackWindowOnBeforeUnload() : null; |
| 7591 | + if ( context.fallbackWindowOnBeforeUnload ) { |
| 7592 | + return context.fallbackWindowOnBeforeUnload(); |
| 7593 | + } |
7565 | 7594 | }; |
7566 | 7595 | } |
7567 | 7596 | |
— | — | @@ -7660,6 +7689,9 @@ |
7661 | 7690 | $.wikiEditor.modules.dialogs.fn.resize ); |
7662 | 7691 | }); |
7663 | 7692 | } |
| 7693 | + dialogDiv.bind( 'dialogclose', function() { |
| 7694 | + context.fn.restoreSelection(); |
| 7695 | + } ); |
7664 | 7696 | // Add tabindexes to dialog form elements |
7665 | 7697 | // Find the highest tabindex in use |
7666 | 7698 | var maxTI = 0; |
— | — | @@ -8421,43 +8453,53 @@ |
8422 | 8454 | return; |
8423 | 8455 | } |
8424 | 8456 | // Build a model for this |
| 8457 | + var model = new $.wikiEditor.modules.templateEditor.fn.model( $( this ).text() ); |
8425 | 8458 | |
8426 | | - var model = new $.wikiEditor.modules.templateEditor.fn.model( $( this ).text() ); |
| 8459 | + //check if model is collapsible |
8427 | 8460 | if ( !model.isCollapsible() ) { |
8428 | 8461 | return; |
8429 | 8462 | } |
| 8463 | + |
8430 | 8464 | var $template = $( this ) |
8431 | 8465 | .wrap( '<div class="wikiEditor-template"></div>' ) |
8432 | 8466 | .addClass( 'wikiEditor-template-text wikiEditor-nodisplay' ) |
8433 | | - .html( |
8434 | | - // Wrap the start and end of the wikitext in spans so we can bind events to them |
8435 | | - $( this ).html() |
8436 | | - .replace( /\{\{/, '<span class="wikiEditor-template-start">{{</span><span class="wikiEditor-template-inner-text">' ) |
8437 | | - .replace( /\}\}$/, '</span><span class="wikiEditor-template-end">}}</span>' ) ) //grab the *last* {{ |
8438 | | - .css( 'visibility', 'hidden' ) |
8439 | 8467 | .parent() |
8440 | 8468 | .addClass( 'wikiEditor-template-collapsed' ) |
8441 | 8469 | .data( 'model', model ); |
| 8470 | + |
8442 | 8471 | $( '<span />' ) |
8443 | | - .addClass( 'wikiEditor-template-name wikiEditor-noinclude' ) |
8444 | | - .text( model.getName() ) |
8445 | | - .mousedown( noEdit ) |
8446 | | - .prependTo( $template ); |
8447 | | - $template.find( '.wikiEditor-template-end, .wikiEditor-template-start' ).mousedown( toggleWikiText ); |
| 8472 | + .addClass( 'wikiEditor-template-name wikiEditor-noinclude' ) |
| 8473 | + .text( model.getName() ) |
| 8474 | + .mousedown( function(){createDialog( $template );} ) //have to pass template so model stays in sync |
| 8475 | + .prependTo( $template ); |
| 8476 | + |
| 8477 | + |
8448 | 8478 | var $options = $( '<ul />' ) |
8449 | | - .addClass( 'wikiEditor-template-modes wikiEditor-noinclude' ) |
8450 | | - .append( $( '<li />' ) |
8451 | | - .addClass( 'wikiEditor-template-action-wikiText' ) |
8452 | | - .append( $( '<img />' ).attr( 'src', |
8453 | | - $.wikiEditor.imgPath + 'templateEditor/' + 'wiki-text.png' ) ) |
8454 | | - .mousedown( toggleWikiText ) ) |
8455 | | - .insertAfter( $template.find( '.wikiEditor-template-name' ) ); |
8456 | | - $options.append( |
8457 | | - $( '<li />' ) |
8458 | | - .addClass( 'wikiEditor-template-action-form' ) |
8459 | | - .append( $( '<span>F</span>' ) ) |
8460 | | - .mousedown( function(){createDialog($template); return false;} )); |
| 8479 | + .addClass( 'wikiEditor-template-modes wikiEditor-noinclude' ) |
| 8480 | + .append( $( '<li />' ) |
| 8481 | + .addClass( 'wikiEditor-template-action-wikiText' ) |
| 8482 | + .append( $( '<img />' ).attr( 'src', |
| 8483 | + $.wikiEditor.imgPath + 'templateEditor/' + 'wiki-text.png' ) ) |
| 8484 | + .mousedown( toggleWikiTextEditor ) ) |
| 8485 | + .insertAfter( $template.find( '.wikiEditor-template-name' ) ); |
8461 | 8486 | |
| 8487 | + function toggleWikiTextEditor(){ |
| 8488 | + var $template = $( this ).closest( '.wikiEditor-template' ); |
| 8489 | + $template |
| 8490 | + .toggleClass( 'wikiEditor-template-expanded' ) |
| 8491 | + .toggleClass( 'wikiEditor-template-collapsed' ); |
| 8492 | + var $wikitext = $template.children('.wikiEditor-template-text'); |
| 8493 | + $wikitext.toggleClass('wikiEditor-nodisplay'); |
| 8494 | + |
| 8495 | + //if we just collapsed this |
| 8496 | + if( $template.hasClass('wikiEditor-template-collapsed') ) { |
| 8497 | + var model = new $.wikiEditor.modules.templateEditor.fn.model( $template.children( '.wikiEditor-template-text' ).text() ); |
| 8498 | + $template.data( 'model' , model ); |
| 8499 | + $template.children( '.wikiEditor-template-name' ).text( model.getName() ); |
| 8500 | + } |
| 8501 | + |
| 8502 | + return false; |
| 8503 | + }; |
8462 | 8504 | |
8463 | 8505 | // Expand |
8464 | 8506 | function expandTemplate( $displayDiv ) { |
— | — | @@ -8498,6 +8540,7 @@ |
8499 | 8541 | |
8500 | 8542 | function createDialog( $templateDiv ){ |
8501 | 8543 | var templateModel = $templateDiv.data('model'); |
| 8544 | + console.log(templateModel.getText()); |
8502 | 8545 | var $dialog = $("<div></div>"); |
8503 | 8546 | var $title = $("<div>" + templateModel.getName() + "</div>").addClass('wikiEditor-template-dialog-title'); |
8504 | 8547 | var $table = $("<table></table>") |
— | — | @@ -8530,9 +8573,12 @@ |
8531 | 8574 | |
8532 | 8575 | }).text("OK").appendTo($dialog); |
8533 | 8576 | $dialog.dialog(); //opens dialog |
| 8577 | + return false; |
8534 | 8578 | }; |
8535 | 8579 | |
8536 | 8580 | |
| 8581 | + |
| 8582 | + |
8537 | 8583 | function toggleWikiText( ) { |
8538 | 8584 | var $template = $( this ).closest( '.wikiEditor-template' ); |
8539 | 8585 | $template |
— | — | @@ -8558,9 +8604,11 @@ |
8559 | 8605 | } |
8560 | 8606 | return false; |
8561 | 8607 | } |
8562 | | - function noEdit() { |
8563 | | - return false; |
8564 | | - } |
| 8608 | + |
| 8609 | + function noEdit() { |
| 8610 | + return false; |
| 8611 | + } |
| 8612 | + |
8565 | 8613 | }); |
8566 | 8614 | |
8567 | 8615 | }, |
— | — | @@ -9786,6 +9834,7 @@ |
9787 | 9835 | } |
9788 | 9836 | break; |
9789 | 9837 | case 'dialog': |
| 9838 | + context.fn.saveSelection(); |
9790 | 9839 | context.$textarea.wikiEditor( 'openDialog', action.module ); |
9791 | 9840 | break; |
9792 | 9841 | default: break; |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/js/plugins.combined.min.js |
— | — | @@ -434,13 +434,15 @@ |
435 | 435 | $(this).trigger('scrollToPosition');});}};switch(command){case'encapsulateSelection':options=$.extend({'pre':'','peri':'','post':'','ownline':false,'replace':false},options);break;case'getCaretPosition':options=$.extend({'startAndEnd':false},options);break;case'setSelection':options=$.extend({'start':undefined,'end':undefined,'startContainer':undefined,'endContainer':undefined},options);if(options.end===undefined) |
436 | 436 | options.end=options.start;if(options.endContainer==undefined) |
437 | 437 | options.endContainer=options.startContainer;break;case'scrollToCaretPosition':options=$.extend({'force':false},options);break;} |
438 | | -var context=$(this).data('wikiEditor-context');var hasIframe=context!==undefined&&context.$iframe!==undefined;return(hasIframe?context.fn:fn)[command].call(this,options);};})(jQuery);(function($){$.wikiEditor={'modules':{},'instances':[],'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',3.1]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',3.1]]}},'imgPath':wgScriptPath+'/extensions/UsabilityInitiative_alpha/images/wikiEditor/','isSupported':function(){if(typeof $.wikiEditor.supported!='undefined'){return $.wikiEditor.supported;} |
| 438 | +var context=$(this).data('wikiEditor-context');var hasIframe=context!==undefined&&context.$iframe!==undefined;var needSave=false;if(hasIframe&&context.savedSelection!==null){context.fn.restoreSelection();needSave=true;} |
| 439 | +retval=(hasIframe?context.fn:fn)[command].call(this,options);if(hasIframe&&needSave){context.fn.saveSelection();} |
| 440 | +return retval;};})(jQuery);(function($){$.wikiEditor={'modules':{},'instances':[],'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',3.1]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',3.1]]}},'imgPath':wgScriptPath+'/extensions/UsabilityInitiative_alpha/images/wikiEditor/','isSupported':function(){if(typeof $.wikiEditor.supported!='undefined'){return $.wikiEditor.supported;} |
439 | 441 | if(!($.browser.name in $.wikiEditor.browsers[$('body').is('.rtl')?'rtl':'ltr'])){return $.wikiEditor.supported=true;} |
440 | 442 | var browser=$.wikiEditor.browsers[$('body').is('.rtl')?'rtl':'ltr'][$.browser.name];for(var condition in browser){var op=browser[condition][0];var val=browser[condition][1];if(typeof val=='string'){if(!(eval('$.browser.version'+op+'"'+val+'"'))){return $.wikiEditor.supported=false;}}else if(typeof val=='number'){if(!(eval('$.browser.versionNumber'+op+val))){return $.wikiEditor.supported=false;}}} |
441 | 443 | return $.wikiEditor.supported=true;},'autoMsg':function(object,property){if(typeof property=='object'){for(var i in property){if(property[i]in object||property[i]+'Msg'in object){property=property[i];break;}}} |
442 | 444 | if(property in object){return object[property];}else if(property+'Msg'in object){if(typeof object[property+'Msg']=='object'){return mw.usability.getMsg.apply(mw.usability,object[property+'Msg']);}else{return mw.usability.getMsg(object[property+'Msg']);}}else{return'';}},'autoLang':function(object,lang){return object[lang||wgUserLanguage]||object['default']||object;},'autoIcon':function(icon,path,lang){var src=$.wikiEditor.autoLang(icon,lang);path=path||$.wikiEditor.imgPath;if(src.substr(0,7)!='http://'&&src.substr(0,8)!='https://'&&src[0]!='/'){src=path+src;} |
443 | 445 | return src+'?'+wgWikiEditorIconVersion;}};$.fn.wikiEditor=function(){if(!$j.wikiEditor.isSupported()){return $(this);} |
444 | | -var context=$(this).data('wikiEditor-context');if(typeof context=='undefined'){context={'$textarea':$(this),'views':{},'modules':{},'data':{},'instance':$.wikiEditor.instances.push($(this))-1,'offsets':null,'htmlToTextMap':{},'oldHTML':null,'oldDelayedHTML':null};context.api={'addModule':function(context,data){var modules={};if(typeof data=='string'){modules[data]={};}else if(typeof data=='object'){modules=data;} |
| 446 | +var context=$(this).data('wikiEditor-context');if(typeof context=='undefined'){context={'$textarea':$(this),'views':{},'modules':{},'data':{},'instance':$.wikiEditor.instances.push($(this))-1,'offsets':null,'htmlToTextMap':{},'oldHTML':null,'oldDelayedHTML':null,'savedSelection':null};context.api={'addModule':function(context,data){var modules={};if(typeof data=='string'){modules[data]={};}else if(typeof data=='object'){modules=data;} |
445 | 447 | for(var module in modules){if(typeof module=='string'&&module in $.wikiEditor.modules){if('api'in $.wikiEditor.modules[module]){for(var call in $.wikiEditor.modules[module].api){if(!(call in context.api)){context.api[call]=$.wikiEditor.modules[module].api[call];}}} |
446 | 448 | if('fn'in $.wikiEditor.modules[module]&&'create'in $.wikiEditor.modules[module].fn){context.modules[module]={};$.wikiEditor.modules[module].fn.create(context,modules[module]);}}}}};context.evt={'change':function(event){event.data.scope='division';var newHTML=context.$content.html();if(context.oldHTML!=newHTML){context.fn.purgeOffsets();context.oldHTML=newHTML;event.data.scope='realchange';} |
447 | 449 | return true;},'delayedChange':function(event){event.data.scope='division';var newHTML=context.$content.html();if(context.oldDelayedHTML!=newHTML){context.fn.purgeOffsets();context.oldDelayedHTML=newHTML;event.data.scope='realchange';} |
— | — | @@ -457,7 +459,7 @@ |
458 | 460 | if(t&&!t.inP&&t.node.nodeName=='#text'&&t.node.nodeValue.charAt(0)!='\n'&&t.node.nodeValue.charAt(0)!='\r'){text+="\n";} |
459 | 461 | $(this).text(text);}});var retval;if($.browser.msie){retval=$('<pre>'+$pre.html()+'</pre>').text().replace(/\r/g,'\n');}else{retval=$pre.text();} |
460 | 462 | return context.htmlToTextMap[origHTML]=leading+retval+trailing;},'getContents':function(){return context.fn.htmlToText(context.$content.html());},'getSelection':function(){var retval;if(context.$iframe[0].contentWindow.getSelection){retval=context.$iframe[0].contentWindow.getSelection();if($.browser.opera){if(retval.rangeCount>0){retval=context.fn.htmlToText($('<pre />').append(retval.getRangeAt(0).cloneContents()).html());}else{retval='';}}}else if(context.$iframe[0].contentWindow.document.selection){retval=context.$iframe[0].contentWindow.document.selection.createRange();} |
461 | | -if(typeof retval.text!='undefined'){retval=context.fn.htmlToText(retval.htmlText);}else if(retval.toString){retval=retval.toString();} |
| 463 | +if(typeof retval.text!='undefined'){retval=context.fn.htmlToText(retval.htmlText);}else if(typeof retval.toString!='undefined'){retval=retval.toString();} |
462 | 464 | return retval;},'encapsulateSelection':function(options){var selText=$(this).textSelection('getSelection');var selTextArr;var selectAfter=false;var pre=options.pre,post=options.post;if(!selText){selText=options.peri;selectAfter=true;}else if(options.replace){selText=options.peri;}else if(selText.charAt(selText.length-1)==' '){selText=selText.substring(0,selText.length-1);post+=' ';} |
463 | 465 | if(options.splitlines){selTextArr=selText.split(/\n/);} |
464 | 466 | if(context.$iframe[0].contentWindow.getSelection){var range=context.$iframe[0].contentWindow.getSelection().getRangeAt(0);if(options.ownline){var atStart=false,atEnd=false;var body=context.$content.get(0);if(range.startOffset==0){atStart=true;}else if(range.startContainer==body){var n=body.firstChild;for(var i=0;i<range.startOffset-1&&n;i++){n=n.nextSibling;} |
— | — | @@ -505,16 +507,18 @@ |
506 | 508 | var base=context.offsets[lowerBound];return context.offsets[offset]={'node':base.node,'offset':base.offset+offset-lowerBound,'length':base.length,'depth':base.depth,'lastTextNode':base.lastTextNode,'lastTextNodeDepth':base.lastTextNodeDepth};},'purgeOffsets':function(){context.offsets=null;},'refreshOffsets':function(){context.offsets=[];var t=context.fn.traverser(context.$content);var pos=0,lastTextNode=null,lastTextNodeDepth=null;while(t){if(t.node.nodeName!='#text'&&t.node.nodeName!='BR'&&t.node.nodeName!='P'){t=t.next();continue;} |
507 | 509 | var nextPos=t.node.nodeName=='#text'?pos+t.node.nodeValue.length:pos+1;var nextT=t.next();var leavingP=t.node.nodeName!='P'&&t.inP&&nextT&&(!nextT.inP||nextT.inP!=t.inP);context.offsets[pos]={'node':t.node,'offset':0,'length':nextPos-pos+(leavingP?1:0),'depth':t.depth,'lastTextNode':lastTextNode,'lastTextNodeDepth':lastTextNodeDepth};if(leavingP){context.offsets[nextPos]={'node':t.node,'offset':nextPos-pos,'length':nextPos-pos+1,'depth':t.depth,'lastTextNode':lastTextNode,'lastTextNodeDepth':lastTextNodeDepth};} |
508 | 510 | pos=nextPos+(leavingP?1:0);if(t.node.nodeName=='#text'){lastTextNode=t.node;lastTextNodeDepth=t.depth;} |
509 | | -t=nextT;}}};context.$textarea.wrap($('<div></div>').addClass('wikiEditor-ui')).wrap($('<div></div>').addClass('wikiEditor-ui-view wikiEditor-ui-view-wikitext')).wrap($('<div></div>').addClass('wikiEditor-ui-left')).wrap($('<div></div>').addClass('wikiEditor-ui-bottom')).wrap($('<div></div>').addClass('wikiEditor-ui-text'));context.$ui=context.$textarea.parent().parent().parent().parent().parent();context.$wikitext=context.$textarea.parent().parent().parent().parent();context.$wikitext.before($('<div></div>').addClass('wikiEditor-ui-controls').append($('<div></div>').addClass('wikiEditor-ui-tabs').hide()).append($('<div></div>').addClass('wikiEditor-ui-buttons'))).before($('<div style="clear:both;"></div>'));context.$controls=context.$ui.find('.wikiEditor-ui-buttons').hide();context.$buttons=context.$ui.find('.wikiEditor-ui-buttons');context.$tabs=context.$ui.find('.wikiEditor-ui-tabs');context.$ui.after($('<div style="clear:both;"></div>'));context.$wikitext.append($('<div></div>').addClass('wikiEditor-ui-right'));context.$wikitext.find('.wikiEditor-ui-left').prepend($('<div></div>').addClass('wikiEditor-ui-top'));context.view='wikitext';$(window).resize(function(event){context.fn.trigger('resize',event);});context.$iframe=$('<iframe></iframe>').attr({'frameBorder':0,'border':0,'src':wgScriptPath+'/extensions/UsabilityInitiative_alpha/js/plugins/jquery.wikiEditor.html?'+'instance='+context.instance+'&ts='+(new Date()).getTime(),'id':'wikiEditor-iframe-'+context.instance}).css({'backgroundColor':'white','width':'100%','height':context.$textarea.height(),'display':'none','overflow-y':'scroll','overflow-x':'hidden'}).insertAfter(context.$textarea).load(function(){if(!this.isSecondRun){context.$iframe[0].contentWindow.document.designMode='on';if($.browser.msie){this.isSecondRun=true;return;}} |
| 511 | +t=nextT;}},'saveSelection':function(){if(!$.browser.msie){return;} |
| 512 | +context.$iframe[0].contentWindow.focus();context.savedSelection=context.$iframe[0].contentWindow.document.selection.createRange();},'restoreSelection':function(){if(!$.browser.msie||context.savedSelection===null){return;} |
| 513 | +context.$iframe[0].contentWindow.focus();context.savedSelection.select();context.savedSelection=null;}};context.$textarea.wrap($('<div></div>').addClass('wikiEditor-ui')).wrap($('<div></div>').addClass('wikiEditor-ui-view wikiEditor-ui-view-wikitext')).wrap($('<div></div>').addClass('wikiEditor-ui-left')).wrap($('<div></div>').addClass('wikiEditor-ui-bottom')).wrap($('<div></div>').addClass('wikiEditor-ui-text'));context.$ui=context.$textarea.parent().parent().parent().parent().parent();context.$wikitext=context.$textarea.parent().parent().parent().parent();context.$wikitext.before($('<div></div>').addClass('wikiEditor-ui-controls').append($('<div></div>').addClass('wikiEditor-ui-tabs').hide()).append($('<div></div>').addClass('wikiEditor-ui-buttons'))).before($('<div style="clear:both;"></div>'));context.$controls=context.$ui.find('.wikiEditor-ui-buttons').hide();context.$buttons=context.$ui.find('.wikiEditor-ui-buttons');context.$tabs=context.$ui.find('.wikiEditor-ui-tabs');context.$ui.after($('<div style="clear:both;"></div>'));context.$wikitext.append($('<div></div>').addClass('wikiEditor-ui-right'));context.$wikitext.find('.wikiEditor-ui-left').prepend($('<div></div>').addClass('wikiEditor-ui-top'));context.view='wikitext';$(window).resize(function(event){context.fn.trigger('resize',event);});context.$iframe=$('<iframe></iframe>').attr({'frameBorder':0,'border':0,'src':wgScriptPath+'/extensions/UsabilityInitiative_alpha/js/plugins/jquery.wikiEditor.html?'+'instance='+context.instance+'&ts='+(new Date()).getTime(),'id':'wikiEditor-iframe-'+context.instance}).css({'backgroundColor':'white','width':'100%','height':context.$textarea.height(),'display':'none','overflow-y':'scroll','overflow-x':'hidden'}).insertAfter(context.$textarea).load(function(){if(!this.isSecondRun){context.$iframe[0].contentWindow.document.designMode='on';if($.browser.msie){this.isSecondRun=true;return;}} |
510 | 514 | context.$content=$(context.$iframe[0].contentWindow.document.body);var html=context.$textarea.val().replace(/ /g,'&nbsp;').replace(/\<br\>/g,'<br>').replace(/\<span class="wikiEditor-tab"\>\<\/span\>/g,'<span class="wikiEditor-tab"></span>');if($.browser.msie){if($.browser.versionNumber<=7){html=html.replace(/ /g," ");}else{html=html.replace(/(^|\n) /g,"$1 ");} |
511 | 515 | html=html.replace(/\t/g,'<span class="wikiEditor-tab"></span>');} |
512 | 516 | html=$('<div />').text('<p>'+html.replace(/\r?\n/g,'</p><p>')+'</p>').html().replace(/&nbsp;/g,' ').replace(/<p>/g,'<p>').replace(/<\/p>/g,'</p>').replace(/<p><\/p>/g,'<br>').replace(/<span class="wikiEditor-tab"><\/span>/g,'<span class="wikiEditor-tab"></span>').replace(/&amp;nbsp;/g,'&nbsp;').replace(/&lt;br&gt;/g,'<br>').replace(/&lt;span class=&quot;wikiEditor-tab&quot;&gt;&lt;\/span&gt;/g,'<span class="wikiEditor-tab"></span>');context.$content.html(html);context.oldHTML=html;if($('body').is('.rtl')){context.$content.addClass('rtl').attr('dir','rtl');} |
513 | | -context.$textarea.attr('disabled',true);context.$textarea.hide();context.$iframe.show();context.fn.trigger('ready');$(context.$iframe[0].contentWindow.document).bind('keyup mouseup paste cut encapsulateSelection',function(event){context.fn.trigger('change',event);}).delayedBind(250,'keyup mouseup paste cut encapsulateSelection',function(event){context.fn.trigger('delayedChange',event);});});context.$textarea.closest('form').submit(function(){context.$textarea.attr('disabled',false);context.$textarea.val(context.$textarea.textSelection('getContents'));});context.fallbackWindowOnBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){context.$textarea.val(context.$textarea.textSelection('getContents'));return context.fallbackWindowOnBeforeUnload?context.fallbackWindowOnBeforeUnload():null;};} |
| 517 | +context.$textarea.attr('disabled',true);context.$textarea.hide();context.$iframe.show();context.fn.trigger('ready');$(context.$iframe[0].contentWindow.document).bind('keyup mouseup paste cut encapsulateSelection',function(event){context.fn.trigger('change',event);}).delayedBind(250,'keyup mouseup paste cut encapsulateSelection',function(event){context.fn.trigger('delayedChange',event);});});context.$textarea.closest('form').submit(function(){context.$textarea.attr('disabled',false);context.$textarea.val(context.$textarea.textSelection('getContents'));});context.fallbackWindowOnBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){context.$textarea.val(context.$textarea.textSelection('getContents'));if(context.fallbackWindowOnBeforeUnload){return context.fallbackWindowOnBeforeUnload();}};} |
514 | 518 | var args=$.makeArray(arguments);if(args.length>0){var call=args.shift();if(call in context.api){context.api[call](context,typeof args[0]=='undefined'?{}:args[0]);}} |
515 | 519 | return $(this).data('wikiEditor-context',context);};})(jQuery);RegExp.escape=function(s){return s.replace(/([.*+?^${}()|\/\\[\]])/g,'\\$1');};(function($){$.wikiEditor.modules.dialogs={api:{addDialog:function(context,data){$.wikiEditor.modules.dialogs.fn.create(context,data)},openDialog:function(context,module){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('open');}},closeDialog:function(context,data){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('close');}}},fn:{create:function(context,config){for(module in config){$.wikiEditor.modules.dialogs.modules[module]=config[module];} |
516 | 520 | mw.usability.load(['$j.ui','$j.ui.dialog','$j.ui.draggable','$j.ui.resizable'],function(){for(module in $.wikiEditor.modules.dialogs.modules){var module=$.wikiEditor.modules.dialogs.modules[module];if($('#'+module.id).size()==0){var configuration=module.dialog;configuration.bgiframe=true;configuration.autoOpen=false;configuration.modal=true;configuration.title=$.wikiEditor.autoMsg(module,'title');configuration.newButtons={};for(msg in configuration.buttons) |
517 | 521 | configuration.newButtons[mw.usability.getMsg(msg)]=configuration.buttons[msg];configuration.buttons=configuration.newButtons;var dialogDiv=$('<div /> ').attr('id',module.id).html(module.html).data('context',context).appendTo($('body')).each(module.init).dialog(configuration);if(!('resizeme'in module)||module.resizeme){dialogDiv.bind('dialogopen',$.wikiEditor.modules.dialogs.fn.resize).find('.ui-tabs').bind('tabsshow',function(){$(this).closest('.ui-dialog-content').each($.wikiEditor.modules.dialogs.fn.resize);});} |
518 | | -var maxTI=0;$j('[tabindex]').each(function(){var ti=parseInt($j(this).attr('tabindex'));if(ti>maxTI) |
| 522 | +dialogDiv.bind('dialogclose',function(){context.fn.restoreSelection();});var maxTI=0;$j('[tabindex]').each(function(){var ti=parseInt($j(this).attr('tabindex'));if(ti>maxTI) |
519 | 523 | maxTI=ti;});var tabIndex=maxTI+1;$j('.ui-dialog input, .ui-dialog button').not('[tabindex]').each(function(){$j(this).attr('tabindex',tabIndex++);});}}});},resize:function(){var wrapper=$(this).closest('.ui-dialog');var oldWidth=wrapper.width();var oldHidden=$(this).find('*').not(':visible');oldHidden.each(function(){$(this).data('oldstyle',$(this).attr('style'));});oldHidden.show();var oldWS=$(this).css('white-space');$(this).css('white-space','nowrap');if(wrapper.width()<=$(this).get(0).scrollWidth){var thisWidth=$(this).data('thisWidth')?$(this).data('thisWidth'):0;thisWidth=Math.max($(this).get(0).scrollWidth,thisWidth);$(this).width(thisWidth);$(this).data('thisWidth',thisWidth);var wrapperWidth=$(this).data('wrapperWidth')?$(this).data('wrapperWidth'):0;wrapperWidth=Math.max(wrapper.get(0).scrollWidth,wrapperWidth);wrapper.width(wrapperWidth);$(this).data('wrapperWidth',wrapperWidth);$(this).dialog({'width':wrapper.width()});wrapper.css('left',parseInt(wrapper.css('left'))-(wrapper.width()-oldWidth)/2);} |
520 | 524 | $(this).css('white-space',oldWS);oldHidden.each(function(){$(this).attr('style',$(this).data('oldstyle'));});}},modules:{},quickDialog:function(body,settings){$('<div />').text(body).appendTo($('body')).dialog($.extend({bgiframe:true,modal:true},settings)).dialog('open');}};})(jQuery);(function($){$.wikiEditor.modules.highlight={cfg:{'styleVersion':3},evt:{delayedChange:function(context,event){if(event.data.scope=='realchange'){$.wikiEditor.modules.highlight.fn.scan(context,"");$.wikiEditor.modules.highlight.fn.mark(context,"","");}},ready:function(context,event){$.wikiEditor.modules.highlight.fn.scan(context,"");$.wikiEditor.modules.highlight.fn.mark(context,"","");}},fn:{create:function(context,config){context.modules.highlight.markersStr='';},divide:function(context){},isolate:function(context){return[];},strip:function(context,division){return $('<div />').html(division.html().replace(/\<br[^\>]*\>/g,"\n")).text();},scan:function(context,division){function Token(offset,label,tokenStart,match){this.offset=offset;this.label=label;this.tokenStart=tokenStart;this.match=match;} |
521 | 525 | var tokenArray=context.modules.highlight.tokenArray=[];var text=context.fn.getContents();for(module in context.modules){if(module in $.wikiEditor.modules&&'exp'in $.wikiEditor.modules[module]){for(var i=0;i<$.wikiEditor.modules[module].exp.length;i++){var regex=$.wikiEditor.modules[module].exp[i].regex;var label=$.wikiEditor.modules[module].exp[i].label;var markAfter=false;if(typeof $.wikiEditor.modules[module].exp[i].markAfter!='undefined'){markAfter=true;} |
— | — | @@ -571,9 +575,10 @@ |
572 | 576 | if(tokenIndex<tokenArray.length){var beginIndex=tokenIndex;var endIndex=-1;var openTemplates=1;var templatesMatched=false;while(tokenIndex<tokenArray.length-1&&endIndex==-1){tokenIndex++;if(tokenArray[tokenIndex].label=='TEMPLATE_BEGIN'){openTemplates++;}else if(tokenArray[tokenIndex].label=='TEMPLATE_END'){openTemplates--;if(openTemplates==0){endIndex=tokenIndex;}}} |
573 | 577 | if(endIndex!=-1){markers.push({start:tokenArray[beginIndex].offset,end:tokenArray[endIndex].offset,type:'template',anchor:'wrap',afterWrap:$.wikiEditor.modules.templateEditor.fn.stylize,beforeUnwrap:function(node){$(node).data('display').remove();},onSkip:function(){},getAnchor:function(ca1,ca2){return $(ca1.parentNode).is('div.wikiEditor-template-text')&&$(ca1.parentNode.previousSibling).is('ul.wikiEditor-template-modes')&&ca1.parentNode.nextSibling==null?ca1.parentNode:null;}});}else{tokenArray[beginIndex].label='TEMPLATE_FALSE_BEGIN';tokenIndex=beginIndex;}}}}},exp:[{'regex':/{{/,'label':"TEMPLATE_BEGIN"},{'regex':/}}/,'label':"TEMPLATE_END",'markAfter':true}],cfg:{},fn:{create:function(context,config){context.modules.templateEditor={};},stylize:function(wrappedTemplate){$(wrappedTemplate).each(function(){if(typeof $(this).data('model')!='undefined'){return;} |
574 | 578 | var model=new $.wikiEditor.modules.templateEditor.fn.model($(this).text());if(!model.isCollapsible()){return;} |
575 | | -var $template=$(this).wrap('<div class="wikiEditor-template"></div>').addClass('wikiEditor-template-text wikiEditor-nodisplay').html($(this).html().replace(/\{\{/,'<span class="wikiEditor-template-start">{{</span><span class="wikiEditor-template-inner-text">').replace(/\}\}$/,'</span><span class="wikiEditor-template-end">}}</span>')).css('visibility','hidden').parent().addClass('wikiEditor-template-collapsed').data('model',model);$('<span />').addClass('wikiEditor-template-name wikiEditor-noinclude').text(model.getName()).mousedown(noEdit).prependTo($template);$template.find('.wikiEditor-template-end, .wikiEditor-template-start').mousedown(toggleWikiText);var $options=$('<ul />').addClass('wikiEditor-template-modes wikiEditor-noinclude').append($('<li />').addClass('wikiEditor-template-action-wikiText').append($('<img />').attr('src',$.wikiEditor.imgPath+'templateEditor/'+'wiki-text.png')).mousedown(toggleWikiText)).insertAfter($template.find('.wikiEditor-template-name'));$options.append($('<li />').addClass('wikiEditor-template-action-form').append($('<span>F</span>')).mousedown(function(){createDialog($template);return false;}));function expandTemplate($displayDiv){$displayDiv.removeClass('wikiEditor-template-collapsed');$displayDiv.addClass('wikiEditor-template-expanded');$displayDiv.unbind('mousedown');$keyValueTable=$('<table />').appendTo($displayDiv);$header_row=$('<tr />').appendTo($keyValueTable);$('<th />').attr('colspan','2').text(model.getName()).appendTo($header_row);for(param in model.getAllParamNames()){$keyVal_row=$('<tr />').appendTo($keyValueTable);$('<td />').text(param).appendTo($keyVal_row);$('<td />').text(model.getValue(param)).appendTo($keyVal_row);}};function collapseTemplate($displayDiv){$displayDiv.addClass('wikiEditor-template-collapsed');$displayDiv.removeClass('wikiEditor-template-expanded');$displayDiv.text(model.getName());};function createDialog($templateDiv){var templateModel=$templateDiv.data('model');var $dialog=$("<div></div>");var $title=$("<div>"+templateModel.getName()+"</div>").addClass('wikiEditor-template-dialog-title');var $table=$("<table></table>").addClass('wikiEditor-template-dialog-table').appendTo($dialog);var allInitialParams=templateModel.getAllInitialParams();for(var paramIndex in allInitialParams){var param=allInitialParams[paramIndex];if(typeof param.name=='undefined'){continue;} |
| 579 | +var $template=$(this).wrap('<div class="wikiEditor-template"></div>').addClass('wikiEditor-template-text wikiEditor-nodisplay').parent().addClass('wikiEditor-template-collapsed').data('model',model);$('<span />').addClass('wikiEditor-template-name wikiEditor-noinclude').text(model.getName()).mousedown(function(){createDialog($template);}).prependTo($template);var $options=$('<ul />').addClass('wikiEditor-template-modes wikiEditor-noinclude').append($('<li />').addClass('wikiEditor-template-action-wikiText').append($('<img />').attr('src',$.wikiEditor.imgPath+'templateEditor/'+'wiki-text.png')).mousedown(toggleWikiTextEditor)).insertAfter($template.find('.wikiEditor-template-name'));function toggleWikiTextEditor(){var $template=$(this).closest('.wikiEditor-template');$template.toggleClass('wikiEditor-template-expanded').toggleClass('wikiEditor-template-collapsed');var $wikitext=$template.children('.wikiEditor-template-text');$wikitext.toggleClass('wikiEditor-nodisplay');if($template.hasClass('wikiEditor-template-collapsed')){var model=new $.wikiEditor.modules.templateEditor.fn.model($template.children('.wikiEditor-template-text').text());$template.data('model',model);$template.children('.wikiEditor-template-name').text(model.getName());} |
| 580 | +return false;};function expandTemplate($displayDiv){$displayDiv.removeClass('wikiEditor-template-collapsed');$displayDiv.addClass('wikiEditor-template-expanded');$displayDiv.unbind('mousedown');$keyValueTable=$('<table />').appendTo($displayDiv);$header_row=$('<tr />').appendTo($keyValueTable);$('<th />').attr('colspan','2').text(model.getName()).appendTo($header_row);for(param in model.getAllParamNames()){$keyVal_row=$('<tr />').appendTo($keyValueTable);$('<td />').text(param).appendTo($keyVal_row);$('<td />').text(model.getValue(param)).appendTo($keyVal_row);}};function collapseTemplate($displayDiv){$displayDiv.addClass('wikiEditor-template-collapsed');$displayDiv.removeClass('wikiEditor-template-expanded');$displayDiv.text(model.getName());};function createDialog($templateDiv){var templateModel=$templateDiv.data('model');console.log(templateModel.getText());var $dialog=$("<div></div>");var $title=$("<div>"+templateModel.getName()+"</div>").addClass('wikiEditor-template-dialog-title');var $table=$("<table></table>").addClass('wikiEditor-template-dialog-table').appendTo($dialog);var allInitialParams=templateModel.getAllInitialParams();for(var paramIndex in allInitialParams){var param=allInitialParams[paramIndex];if(typeof param.name=='undefined'){continue;} |
576 | 581 | var $paramRow=$("<tr></tr>").addClass('wikiEditor-template-dialog-row');var $paramName=$("<td></td>").addClass('wikiEditor-template-dialog-name').text(param.name);var $paramVal=$("<td></td>").addClass('wikiEditor-template-dialog-value');var $paramInput=$("<input></input>").data('name',param.name).val(templateModel.getValue(param.name));$paramVal.append($paramInput);$paramRow.append($paramName).append($paramVal);$table.append($paramRow);} |
577 | | -$("<button></button>").click(function(){$('.wikiEditor-template-dialog-value input').each(function(){templateModel.setValue($(this).data('name'),$(this).val());});$dialog.dialog('close');}).text("OK").appendTo($dialog);$dialog.dialog();};function toggleWikiText(){var $template=$(this).closest('.wikiEditor-template');$template.toggleClass('wikiEditor-template-collapsed').toggleClass('wikiEditor-template-expanded').children('.wikiEditor-template-text, .wikiEditor-template-name, .wikiEditor-template-modes').toggleClass('wikiEditor-nodisplay');if($template.hasClass('wikiEditor-template-collapsed')){var model=new $.wikiEditor.modules.templateEditor.fn.model($template.children('.wikiEditor-template-text').text());$template.data('model',model);$template.children('.wikiEditor-template-name').text(model.getName());} |
| 582 | +$("<button></button>").click(function(){$('.wikiEditor-template-dialog-value input').each(function(){templateModel.setValue($(this).data('name'),$(this).val());});$dialog.dialog('close');}).text("OK").appendTo($dialog);$dialog.dialog();return false;};function toggleWikiText(){var $template=$(this).closest('.wikiEditor-template');$template.toggleClass('wikiEditor-template-collapsed').toggleClass('wikiEditor-template-expanded').children('.wikiEditor-template-text, .wikiEditor-template-name, .wikiEditor-template-modes').toggleClass('wikiEditor-nodisplay');if($template.hasClass('wikiEditor-template-collapsed')){var model=new $.wikiEditor.modules.templateEditor.fn.model($template.children('.wikiEditor-template-text').text());$template.data('model',model);$template.children('.wikiEditor-template-name').text(model.getName());} |
578 | 583 | else{$template.children('.wikiEditor-template-text').children('.wikiEditor-template-inner-text').text($template.data('model').getText().replace(/\{\{/,'').replace(/\}\}$/,''));} |
579 | 584 | return false;} |
580 | 585 | function noEdit(){return false;}});},getTemplateInfo:function(templateName){var templateInfo='';return $(templateInfo);},model:function(wikitext){var collapsible=true;function Param(name,value,number,nameIndex,equalsIndex,valueIndex){this.name=name;this.value=value;this.number=number;this.nameIndex=nameIndex;this.equalsIndex=equalsIndex;this.valueIndex=valueIndex;} |
— | — | @@ -661,7 +666,7 @@ |
662 | 667 | switch(action.type){case'replace':case'encapsulate':var parts={'pre':'','peri':'','post':''};for(part in parts){if(part+'Msg'in action.options){parts[part]=mw.usability.getMsg(action.options[part+'Msg'],(action.options[part]||null));}else{parts[part]=(action.options[part]||'')}} |
663 | 668 | if('regex'in action.options&&'regexReplace'in action.options){var selection=context.$textarea.textSelection('getSelection');if(selection!=''&&selection.match(action.options.regex)){parts.peri=selection.replace(action.options.regex,action.options.regexReplace);parts.pre=parts.post='';}} |
664 | 669 | context.$textarea.textSelection('encapsulateSelection',$.extend({},action.options,parts,{'replace':action.type=='replace'}));context.$iframe[0].contentWindow.focus();break;case'callback':if(typeof action.execute=='function'){action.execute(context);} |
665 | | -break;case'dialog':context.$textarea.wikiEditor('openDialog',action.module);break;default:break;}},buildGroup:function(context,id,group){var $group=$('<div />').attr({'class':'group group-'+id,'rel':id});var label=$.wikiEditor.autoMsg(group,'label');if(label){$group.append('<div class="label">'+label+'</div>')} |
| 670 | +break;case'dialog':context.fn.saveSelection();context.$textarea.wikiEditor('openDialog',action.module);break;default:break;}},buildGroup:function(context,id,group){var $group=$('<div />').attr({'class':'group group-'+id,'rel':id});var label=$.wikiEditor.autoMsg(group,'label');if(label){$group.append('<div class="label">'+label+'</div>')} |
666 | 671 | var empty=true;if('tools'in group){for(tool in group.tools){var tool=$.wikiEditor.modules.toolbar.fn.buildTool(context,tool,group.tools[tool]);if(tool){empty=false;$group.append(tool);}}} |
667 | 672 | return empty?null:$group;},buildTool:function(context,id,tool){if('filters'in tool){for(filter in tool.filters){if($(tool.filters[filter]).size()==0){return null;}}} |
668 | 673 | var label=$.wikiEditor.autoMsg(tool,'label');switch(tool.type){case'button':var src=$.wikiEditor.autoIcon(tool.icon,$.wikiEditor.imgPath+'toolbar/');$button=$('<img />').attr({'src':src,'width':22,'height':22,'alt':label,'title':label,'rel':id,'class':'tool tool-button'});if('action'in tool){$button.data('action',tool.action).data('context',context).click(function(){$.wikiEditor.modules.toolbar.fn.doAction($(this).data('context'),$(this).data('action'),$(this));return false;});} |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/Vector/Vector.combined.min.js |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | $j("#p-cactions").addClass("filledPortlet").removeClass("emptyPortlet").find('h5').css('width','1px').animate({'width':'26px'},390);}).bind("beforeTabExpand",function(){if($j('#p-cactions li').length==1) |
7 | 7 | $j("#p-cactions h5").animate({'width':'1px'},370,function(){$j(this).attr('style','').parent().addClass("emptyPortlet").removeClass("filledPortlet");});}).collapsibleTabs({expandCondition:function(eleWidth){if(rtl){return($j('#right-navigation').position().left+$j('#right-navigation').width()+1)<($j('#left-navigation').position().left-eleWidth);}else{return($j('#left-navigation').position().left+$j('#left-navigation').width()+1)<($j('#right-navigation').position().left-eleWidth);}},collapseCondition:function(){if(rtl){return($j('#right-navigation').position().left+$j('#right-navigation').width())>$j('#left-navigation').position().left;}else{return($j('#left-navigation').position().left+$j('#left-navigation').width())>$j('#right-navigation').position().left;}}});});$j(document).ready(function(){if(!wgVectorEnabledModules.editwarning||$j('#wpTextbox1').size()==0){return true;} |
8 | 8 | $j('#wpTextbox1, #wpSummary').each(function(){$j(this).data('origtext',$j(this).val());});fallbackWindowOnBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){var fallbackResult=null;if(fallbackWindowOnBeforeUnload){fallbackResult=fallbackWindowOnBeforeUnload();} |
9 | | -if(fallbackResult!==null){return fallbackResult;} |
| 9 | +if(fallbackResult!==undefined){return fallbackResult;} |
10 | 10 | if(wgAction=='submit'||$j('#wpTextbox1').data('origtext')!=$j('#wpTextbox1').val()||$j('#wpSummary').data('origtext')!=$j('#wpSummary').val()){return mw.usability.getMsg('vector-editwarning-warning');}} |
11 | 11 | $j('form').submit(function(){window.onbeforeunload=fallbackWindowOnBeforeUnload;});});var fallbackWindowOnBeforeUnload=null;$j(document).ready(function(){if(!wgVectorEnabledModules.footercleanup){return true;} |
12 | 12 | $j('#editpage-copywarn').add('.editOptions').wrapAll('<div id="editpage-bottom"></div>');$j('#wpSummary').data('hint',$j('#wpSummaryLabel span small').remove().text().replace(/\)|\(/g,'')).change(function(){if($j(this).val().length==0){$j(this).addClass('inline-hint').val($j(this).data('hint'));}else{$j(this).removeClass('inline-hint');}}).focus(function(){if($j(this).val()==$j(this).data('hint')){$j(this).removeClass('inline-hint').val("");}}).blur(function(){$j(this).trigger('change');}).trigger('change');$j('#wpSummary').add('.editCheckboxes').wrapAll('<div id="editpage-summary-fields"></div>');$j('#editpage-specialchars').remove();var transclusionCount=$j('.templatesUsed ul li').size();$j('.templatesUsed ul').wrap('<div id="transclusions-list" class="collapsible-list collapsed"></div>').parent().prepend('<label>This page contains <a href="http://en.wikipedia.org/wiki/transclusion">transclusions</a> of <strong>' |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/Vector/Modules/EditWarning/EditWarning.js |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | fallbackResult = fallbackWindowOnBeforeUnload(); |
21 | 21 | } |
22 | 22 | // Check if their onbeforeunload hook returned something |
23 | | - if ( fallbackResult !== null ) { |
| 23 | + if ( fallbackResult !== undefined ) { |
24 | 24 | // Exit here, returning their message |
25 | 25 | return fallbackResult; |
26 | 26 | } |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/Vector/Vector.hooks.php |
— | — | @@ -1,4 +1,4 @@ |
2 | | -<?php |
| 2 | +o<?php |
3 | 3 | /** |
4 | 4 | * Hooks for Usability Initiative Vector extension |
5 | 5 | * |
— | — | @@ -14,15 +14,15 @@ |
15 | 15 | 'raw' => array( |
16 | 16 | array( 'src' => 'Modules/CollapsibleNav/CollapsibleNav.js', 'version' => 7 ), |
17 | 17 | array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 7 ), |
18 | | - array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 6 ), |
| 18 | + array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 7 ), |
19 | 19 | array( 'src' => 'Modules/FooterCleanup/FooterCleanup.js', 'version' => 5 ), |
20 | 20 | array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 7 ), |
21 | 21 | ), |
22 | 22 | 'combined' => array( |
23 | | - array( 'src' => 'Vector.combined.js', 'version' => 19 ), |
| 23 | + array( 'src' => 'Vector.combined.js', 'version' => 21 ), |
24 | 24 | ), |
25 | 25 | 'minified' => array( |
26 | | - array( 'src' => 'Vector.combined.min.js', 'version' => 19 ), |
| 26 | + array( 'src' => 'Vector.combined.min.js', 'version' => 21 ), |
27 | 27 | ), |
28 | 28 | ); |
29 | 29 | static $modules = array( |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/Vector/Vector.combined.js |
— | — | @@ -138,7 +138,7 @@ |
139 | 139 | fallbackResult = fallbackWindowOnBeforeUnload(); |
140 | 140 | } |
141 | 141 | // Check if their onbeforeunload hook returned something |
142 | | - if ( fallbackResult !== null ) { |
| 142 | + if ( fallbackResult !== undefined ) { |
143 | 143 | // Exit here, returning their message |
144 | 144 | return fallbackResult; |
145 | 145 | } |
Index: branches/wmf-deployment/extensions/UsabilityInitiative_alpha/UsabilityInitiative.hooks.php |
— | — | @@ -71,21 +71,21 @@ |
72 | 72 | array( 'src' => 'js/plugins/jquery.delayedBind.js', 'version' => 1 ), |
73 | 73 | array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ), |
74 | 74 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 7 ), |
75 | | - array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 26 ), |
76 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 94 ), |
| 75 | + array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 27 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 96 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 29 ), |
78 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 46 ), |
79 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 11 ), |
| 78 | + array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 47 ), |
| 79 | + array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 12 ), |
80 | 80 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 78 ), |
81 | 81 | array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 10 ), |
82 | 82 | array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 17 ), |
83 | 83 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 2 ), |
84 | 84 | ), |
85 | 85 | 'combined' => array( |
86 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 211 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 213 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 211 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 213 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative_alpha |
___________________________________________________________________ |
Modified: svn:mergeinfo |
93 | 93 | Merged /trunk/extensions/UsabilityInitiative:r61829-61918 |