[interchange-cvs] interchange - heins modified 2 files
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Thu Oct 3 12:21:01 2002
User: heins
Date: 2002-10-03 16:20:27 GMT
Modified: dist/lib/UI/pages/include page_editor template_editor
Log:
* Fix HTML defect that caused IE not to save content properly.
* Add "change saved" to page editor.
Revision Changes Path
1.6 +25 -7 interchange/dist/lib/UI/pages/include/page_editor
rev 1.6, prev_rev 1.5
Index: page_editor
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/lib/UI/pages/include/page_editor,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- page_editor 24 Sep 2002 15:40:57 -0000 1.5
+++ page_editor 3 Oct 2002 16:20:27 -0000 1.6
@@ -4,6 +4,7 @@
<script language=3DJavaScript>
function changed (code, field) {
var name =3D "changed_" + code;
+ silent_revert();
cbox =3D document.getElementById(name);
if(cbox !=3D undefined)
cbox.checked =3D true;
@@ -11,12 +12,29 @@
=20
function submitted (code) {
var name =3D "changed_" + code;
+ silent_revert();
cbox =3D document.getElementById(name);
if(cbox !=3D undefined)
cbox.checked =3D false;
return true;
}
=20
+function silent_revert () {
+ var sil =3D document.getElementById('silent_display');
+ if(sil !=3D undefined)
+ sil.innerHTML =3D '[L]Page Attributes/Controls[/L]';
+ return true;
+}
+
+// Don't remove this, called with forms genned by UI::ContentEditor
+function silent_submit () {
+ var sil =3D document.getElementById('silent_display');
+ if(sil !=3D undefined)
+ sil.innerHTML
+ =3D '[L]Page Attributes/Controls[/L] <span class=3Dcmessage>[L]Change sa=
ved[/L]</span>';
+ return true;
+}
+
function change_alert (code) {
if(code.length =3D=3D 0) {
code =3D 'a new component';
@@ -28,6 +46,7 @@
=20
function check_change () {
var el;
+ silent_revert();
el =3D document.getElementById('changed_[page-param ui_name]');
if(el !=3D undefined && el.checked =3D=3D true) {
return change_alert('the page controls');
@@ -185,12 +204,12 @@
<form name=3Doverall action=3D"[area @@MV_PAGE@@]" method=3DPOST>
<input type=3Dhidden name=3Dui_content_op value=3D"modify">
<input type=3Dhidden name=3Dui_name value=3D"[page-param ui_name]">
- <input type=3Dhidden name=3Dui_type value=3Dpage
+ <input type=3Dhidden name=3Dui_type value=3Dpage>
<input type=3Dhidden name=3Dmv_action value=3D"back">
<table width=3D"100%" cellpadding=3D0 cellspacing=3D0 cellmargin=3D3>
<tr>
<td id=3Dclicker>
- <h3>Page Attributes/Controls</h3>
+ <h3 id=3D"silent_display">Page Attributes/Controls</h3>
Name: <b>[page-param ui_name]</b><BR>
Source: [page-param ui_source]
[page-sub foo_sub]
@@ -227,7 +246,7 @@
<input
style=3D"font-weight: bold"
type=3Dsubmit onClick=3D"return check_change()"
- name=3Dmv_click
+ name=3D"mv_click"
value=3D"[L]Publish[/L]"
>
<input
@@ -236,14 +255,13 @@
'This will destroy all edits you have made to this page '
+ 'since the last Publish operation.\n Are you sure?'
)"
- name=3Dmv_click
+ name=3D"mv_click"
value=3D"[L]Cancel[/L]"
>
<input
type=3Dsubmit
- onClick=3D"return check_change()"
- name=3Dmv_click
- value=3D"[L]Preview[/L]"
+ name=3D"mv_click"
+ value=3D"Preview"
>
<input
type=3Dsubmit
1.5 +1 -1 interchange/dist/lib/UI/pages/include/template_editor
rev 1.5, prev_rev 1.4
Index: template_editor
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/lib/UI/pages/include/template_editor,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template_editor 27 Sep 2002 15:18:01 -0000 1.4
+++ template_editor 3 Oct 2002 16:20:27 -0000 1.5
@@ -167,7 +167,7 @@
<td valign=3Dtop>
<form name=3Doverall action=3D"[area @@MV_PAGE@@]" method=3DPOST>
=20
-<h3 id=3Dsilent_display>Template Attributes</h3>
+<h3 id=3D"silent_display">Template Attributes</h3>
<div align=3Dright>
Description: <input name=3Dui_label size=3D30 value=3D"[tem-param ui_labe=
l]"><BR>
<input type=3Dsubmit