r93210 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93209‎ | r93210 | r93211 >
Date:16:47, 26 July 2011
Author:ankitgarg833
Status:deferred
Tags:
Comment:
adding delimiter support in the form.
@TODO need to add javascript for dynamic loading of delimiter input type
Modified paths:
  • /trunk/extensions/PageSchemas/specials/PS_EditSchema.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PageSchemas/specials/PS_EditSchema.php
@@ -45,8 +45,10 @@
4646 });
4747 jQuery('#templatesList').append(newField);
4848 }
 49+function clickcheckbox(form){
 50+alert('Handler for .change() uncalled.');
 51+}
4952
50 -
5153 jQuery(document).ready(function() {
5254 jQuery(".deleteField").click( function() {
5355 // Remove the encompassing div for this instance.
@@ -57,14 +59,25 @@
5860 // Remove the encompassing div for this instance.
5961 jQuery(this).closest(".templateBox")
6062 .fadeOut('fast', function() { jQuery(this).remove(); });
61 - });
 63+ });
6264 });
 65+
6366 </script>
6467
6568 END;
6669 $wgOut->addScript( $jsText );
6770 }
68 -
 71+/*
 72+@TODO :Code which can be useful
 73+jQuery("#is_list_1").click(function() {
 74+ if (jQuery("#is_list_1").is(":checked"))
 75+ {
 76+ alert('Handler for .change() called.');
 77+ }else{
 78+ alert('Handler for .change() uncalled.');
 79+ }
 80+ });
 81+*/
6982 function execute( $category ) {
7083 global $wgRequest, $wgOut;
7184 global $wgSkin;
@@ -109,9 +122,10 @@
110123 <p>Field name: <input size="15" name="name_1">
111124 Display label: <input size="15" name="label_1">
112125 </p>
113 - <p><input type="checkbox" name="is_list_1"/>
 126+ <p><input type="checkbox" name="is_list_1" onclick="clickcheckbox(this)" />
114127 This field can hold a list of values
115128 </p>
 129+ <p>Delimiter for values (default is ","): <input type="text" name="delimiter_1" /> </p>
116130 <p>Additional XML:
117131 <textarea rows=4 style="width: 100%" name="add_xml_1"></textarea>
118132 </p>
@@ -157,7 +171,9 @@
158172 Display label: <input size="15" name="label_starter">
159173 </p>
160174 <p><input type="checkbox" name="is_list_starter" /> This field can hold a list of values, separated by commas
161 - &#160;&#160; <p>Additional XML:
 175+ &#160;&#160;
 176+ <p>Delimiter for values (default is ","): <input type="text" name="delimiter_starter" /> </p>
 177+ <p>Additional XML:
162178 <textarea rows=4 style="width: 100%" name="add_xml_starter"></textarea>
163179 </p>
164180 <input type="button" value="Remove field" class="deleteField" />

Status & tagging log