Index: openacs-4/contrib/packages/simulation/www/citybuild/object-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/citybuild/Attic/object-edit.adp,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/simulation/www/citybuild/object-edit.adp 6 Jan 2004 13:05:47 -0000 1.4 +++ openacs-4/contrib/packages/simulation/www/citybuild/object-edit.adp 7 Jan 2004 16:01:03 -0000 1.5 @@ -2,54 +2,8 @@ <property name="title">@page_title;noquote@</property> <property name="context">@context;noquote@</property> <property name="focus">object.title</property> - <property name="header_stuff"> - <script language="javascript"> - function FormRefresh(form_name) { - if (document.forms == null) return; - if (document.forms[form_name] == null) return; - if (document.forms[form_name].elements["__refreshing_p"] == null) return; - document.forms[form_name].elements["__refreshing_p"].value = 1; - document.forms[form_name].submit(); - } - function CopyText(text) { - if (document.all) { - holdtext.innerText = text; - Copied = holdtext.createTextRange(); - Copied.execCommand("Copy"); - } else if (window.netscape) { - netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); - - var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard); - if (!clip) return; - - var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable); - if (!trans) return; - - trans.addDataFlavor('text/unicode'); - - var str = new Object(); - var len = new Object(); - - var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); - - var copytext = text; - - str.data = copytext; - - trans.setTransferData("text/unicode", str, copytext. length*2); - - var clipid = Components.interfaces.nsIClipboard; - if (!clipid) return false; - - clip.setData(trans, null, clipid. kGlobalClipboard); - } - } - </script> - <textarea id="holdtext" style="display: none;"></textarea> - </property> - <formtemplate id="object"></formtemplate> TODO: Show on map should be read-only unless user has "sim_set_map_p" priv on package_id -<p>TODO: suppress HTML cut-paste text for stylesheets \ No newline at end of file +<p>TODO: suppress HTML cut-paste text for stylesheets Index: openacs-4/contrib/packages/simulation/www/citybuild/object-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/citybuild/Attic/object-edit.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/contrib/packages/simulation/www/citybuild/object-edit.tcl 15 Dec 2003 15:28:21 -0000 1.8 +++ openacs-4/contrib/packages/simulation/www/citybuild/object-edit.tcl 7 Jan 2004 16:01:03 -0000 1.9 @@ -45,7 +45,7 @@ {content_type:text(radio) {label "Type"} {options {[simulation::object_type::get_options]}} - {html {onChange "javascript:FormRefresh('object');"}} + {html {onChange "javascript:acs_FormRefresh('object');"}} } } } else { @@ -459,7 +459,7 @@ {label $elm_label} \ {section $section} \ {options $options} \ - {html {onChange "javascript:FormRefresh('object');"}} \ + {html {onChange "javascript:acs_FormRefresh('object');"}} \ ] \ ] } @@ -694,7 +694,7 @@ append elm_before_html {<img src="} $thumb_url {" width="50" height="50">} append elm_before_html { } append elm_before_html {<a href="javascript:document.forms['object'].elements['} $elm {'].value = '';} - append elm_before_html {FormRefresh('object');" title="} + append elm_before_html {acs_FormRefresh('object');" title="} append elm_before_html [ad_quotehtml "Remove this $relation_tag"] append elm_before_html {"><img src="/resources/acs-subsite/Delete24.gif" width="24" height="24" border="0">} append elm_before_html {</a>} Index: openacs-4/contrib/packages/simulation/www/simplay/message.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/message.adp,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/packages/simulation/www/simplay/message.adp 6 Jan 2004 13:05:48 -0000 1.5 +++ openacs-4/contrib/packages/simulation/www/simplay/message.adp 7 Jan 2004 16:00:37 -0000 1.6 @@ -2,18 +2,6 @@ <property name="title">@page_title;noquote@</property> <property name="context">@context;noquote@</property> <property name="focus">@focus;noquote@</property> - <property name="header_stuff"> - <script language="javascript"> - function FormRefresh(form_name) { - if (document.forms == null) return; - if (document.forms[form_name] == null) return; - if (document.forms[form_name].elements["__refreshing_p"] == null) return; - - document.forms[form_name].elements["__refreshing_p"].value = 1; - document.forms[form_name].submit(); - } - </script> - </property> <formtemplate id="message"></formtemplate> <p>TODO: Task should be part of heading Index: openacs-4/contrib/packages/simulation/www/simplay/message.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/message.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/contrib/packages/simulation/www/simplay/message.tcl 6 Jan 2004 13:11:54 -0000 1.13 +++ openacs-4/contrib/packages/simulation/www/simplay/message.tcl 7 Jan 2004 16:00:37 -0000 1.14 @@ -78,7 +78,7 @@ -form { {sender_role_id:text(select) {label "From"} - {html {onChange "javascript:FormRefresh('message');"}} + {html {onChange "javascript:acs_FormRefresh('message');"}} {options $all_role_options} } } Index: openacs-4/packages/simulation/www/citybuild/object-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/citybuild/object-edit.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/simulation/www/citybuild/object-edit.adp 6 Jan 2004 13:05:47 -0000 1.4 +++ openacs-4/packages/simulation/www/citybuild/object-edit.adp 7 Jan 2004 16:01:03 -0000 1.5 @@ -2,54 +2,8 @@ <property name="title">@page_title;noquote@</property> <property name="context">@context;noquote@</property> <property name="focus">object.title</property> - <property name="header_stuff"> - <script language="javascript"> - function FormRefresh(form_name) { - if (document.forms == null) return; - if (document.forms[form_name] == null) return; - if (document.forms[form_name].elements["__refreshing_p"] == null) return; - document.forms[form_name].elements["__refreshing_p"].value = 1; - document.forms[form_name].submit(); - } - function CopyText(text) { - if (document.all) { - holdtext.innerText = text; - Copied = holdtext.createTextRange(); - Copied.execCommand("Copy"); - } else if (window.netscape) { - netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); - - var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard); - if (!clip) return; - - var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable); - if (!trans) return; - - trans.addDataFlavor('text/unicode'); - - var str = new Object(); - var len = new Object(); - - var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); - - var copytext = text; - - str.data = copytext; - - trans.setTransferData("text/unicode", str, copytext. length*2); - - var clipid = Components.interfaces.nsIClipboard; - if (!clipid) return false; - - clip.setData(trans, null, clipid. kGlobalClipboard); - } - } - </script> - <textarea id="holdtext" style="display: none;"></textarea> - </property> - <formtemplate id="object"></formtemplate> TODO: Show on map should be read-only unless user has "sim_set_map_p" priv on package_id -<p>TODO: suppress HTML cut-paste text for stylesheets \ No newline at end of file +<p>TODO: suppress HTML cut-paste text for stylesheets Index: openacs-4/packages/simulation/www/citybuild/object-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/citybuild/object-edit.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/simulation/www/citybuild/object-edit.tcl 15 Dec 2003 15:28:21 -0000 1.8 +++ openacs-4/packages/simulation/www/citybuild/object-edit.tcl 7 Jan 2004 16:01:03 -0000 1.9 @@ -45,7 +45,7 @@ {content_type:text(radio) {label "Type"} {options {[simulation::object_type::get_options]}} - {html {onChange "javascript:FormRefresh('object');"}} + {html {onChange "javascript:acs_FormRefresh('object');"}} } } } else { @@ -459,7 +459,7 @@ {label $elm_label} \ {section $section} \ {options $options} \ - {html {onChange "javascript:FormRefresh('object');"}} \ + {html {onChange "javascript:acs_FormRefresh('object');"}} \ ] \ ] } @@ -694,7 +694,7 @@ append elm_before_html {<img src="} $thumb_url {" width="50" height="50">} append elm_before_html { } append elm_before_html {<a href="javascript:document.forms['object'].elements['} $elm {'].value = '';} - append elm_before_html {FormRefresh('object');" title="} + append elm_before_html {acs_FormRefresh('object');" title="} append elm_before_html [ad_quotehtml "Remove this $relation_tag"] append elm_before_html {"><img src="/resources/acs-subsite/Delete24.gif" width="24" height="24" border="0">} append elm_before_html {</a>} Index: openacs-4/packages/simulation/www/simplay/message.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/message.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/simulation/www/simplay/message.adp 6 Jan 2004 13:05:48 -0000 1.5 +++ openacs-4/packages/simulation/www/simplay/message.adp 7 Jan 2004 16:00:37 -0000 1.6 @@ -2,18 +2,6 @@ <property name="title">@page_title;noquote@</property> <property name="context">@context;noquote@</property> <property name="focus">@focus;noquote@</property> - <property name="header_stuff"> - <script language="javascript"> - function FormRefresh(form_name) { - if (document.forms == null) return; - if (document.forms[form_name] == null) return; - if (document.forms[form_name].elements["__refreshing_p"] == null) return; - - document.forms[form_name].elements["__refreshing_p"].value = 1; - document.forms[form_name].submit(); - } - </script> - </property> <formtemplate id="message"></formtemplate> <p>TODO: Task should be part of heading Index: openacs-4/packages/simulation/www/simplay/message.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/message.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/simulation/www/simplay/message.tcl 6 Jan 2004 13:11:54 -0000 1.13 +++ openacs-4/packages/simulation/www/simplay/message.tcl 7 Jan 2004 16:00:37 -0000 1.14 @@ -78,7 +78,7 @@ -form { {sender_role_id:text(select) {label "From"} - {html {onChange "javascript:FormRefresh('message');"}} + {html {onChange "javascript:acs_FormRefresh('message');"}} {options $all_role_options} } }