pari: branch asterisknow r2126 - /branches/asterisknow/config/feditor.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Thu Jan 10 16:07:00 CST 2008
Author: pari
Date: Thu Jan 10 16:06:59 2008
New Revision: 2126
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=2126
Log:
merging some critical fixes made to fileeditor in appliance branch
Modified:
branches/asterisknow/config/feditor.html
Modified: branches/asterisknow/config/feditor.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/feditor.html?view=diff&rev=2126&r1=2125&r2=2126
==============================================================================
--- branches/asterisknow/config/feditor.html (original)
+++ branches/asterisknow/config/feditor.html Thu Jan 10 16:06:59 2008
@@ -113,6 +113,9 @@
top._$('mainscreen').width= 798;
setWindowTitle("File Editor");
load_recordedfiles();
+ showdiv_statusmessage();
+ _$('message_text').innerHTML ="Saving Changes...";
+ _$('status_message').style.display ="none";
ASTGUI.events.add( _$('filenames') , 'change' , loadfile ) ;
parent.loadscreen(this);
}
@@ -198,16 +201,18 @@
function update_contextContent(){
+ _$('status_message').style.display ="" ;
+ _$('bg_transparent').style.display ="" ;
+ try{
+ var chs = new listOfActions();
+ chs.filename(global_fileBeingEdited);
var c = 0;
- var uri = build_action('delcat', c , global_contextBeingEdited ,"", ""); c++;
- uri += build_action('newcat', c , global_contextBeingEdited, "", ""); c++;
-
- var r = 0;
+ chs.build_action('delcat', c , global_contextBeingEdited ,"", "");
+ chs.build_action('newcat', c , global_contextBeingEdited, "", "");
+
+ var r = 0 , posofeq, firstpart, secondpart ;
var u = _$('context_Content').value.split("\n") ;
- var posofeq ;
- var firstpart ;
- var secondpart ;
for( var f=0; f < u.length ; f++ ){
// in u[f] find 'first occurance of =' and split it there
@@ -215,15 +220,20 @@
if( posofeq == -1){ continue; }
firstpart = u[f].substring(0, posofeq );
secondpart = u[f].substring( posofeq+1 );
- uri += build_action('append', c, global_contextBeingEdited, firstpart, secondpart ); c++;
- }
-
- makerequest('u',global_fileBeingEdited, uri, function(t){
- _$('div_editcontextContent').style.display = "none";
- global_contextBeingEdited = "";
- gui_feedback('Context Content Updated','blue');
- config2json( global_fileBeingEdited, 0, fileparsed );
- });
+ chs.build_action('append', c, global_contextBeingEdited, firstpart, secondpart );
+ }
+ }catch(err){
+ _$('status_message').style.display = 'none';
+ _$('bg_transparent').style.display = 'none';
+ }
+ var after = function(){
+ _$('div_editcontextContent').style.display = "none";
+ global_contextBeingEdited = "";
+ gui_feedback('Context Content Updated','blue');
+ config2json( global_fileBeingEdited, 0, fileparsed );
+ };
+
+ chs.callActions(after);
}
@@ -294,7 +304,8 @@
}
}
-
+ _$('status_message').style.display = 'none';
+ _$('bg_transparent').style.display = 'none';
}
function stopBubble(b) {
@@ -390,4 +401,6 @@
</tr>
</table>
</div>
+<div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 24; width:100%; height:100%; background-color:#EFEFEF; -moz-opacity:.50;opacity:.50; border-width: 1px; border-color: #EFEFEF; border-style: solid; z-index:1002">
+</div>
</body>
More information about the asterisk-gui-commits
mailing list