pari: branch asterisknow r714 - in /branches: aadk/ aadk/config/
aadk/config/...
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Thu Apr 19 10:42:53 MST 2007
Author: pari
Date: Thu Apr 19 12:42:52 2007
New Revision: 714
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=714
Log:
Merged revisions 697,703,713 via svnmerge from
https://origsvn.digium.com/svn/asterisk-gui/trunk
........
r697 | pari | 2007-04-18 12:21:50 -0500 (Wed, 18 Apr 2007) | 1 line
Experimental - Multi Language support
........
r703 | bkruse | 2007-04-18 15:51:18 -0500 (Wed, 18 Apr 2007) | 1 line
Replace .ulaw .gsm .whatever with nothing so its just the sound file
........
r713 | pari | 2007-04-19 12:40:21 -0500 (Thu, 19 Apr 2007) | 1 line
new feature: create new config files from file editor
........
Added:
branches/aadk/config/scripts/lang.js
- copied unchanged from r713, trunk/config/scripts/lang.js
Modified:
branches/aadk/ (props changed)
branches/aadk/config/feditor.html
branches/aadk/config/scripts/tooltip.js
branches/aadk/config/users.html
branches/asterisknow/ (props changed)
branches/asterisknow/config/feditor.html
Propchange: branches/aadk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Apr 19 12:42:52 2007
@@ -1,1 +1,1 @@
-/trunk:1-430,433-449,489-501,505-506,508-510,512-540,542-557,559,561-577,580-586,588-616,618-694
+/trunk:1-430,433-449,489-501,505-506,508-510,512-540,542-557,559,561-577,580-586,588-616,618-713
Modified: branches/aadk/config/feditor.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/feditor.html?view=diff&rev=714&r1=713&r2=714
==============================================================================
--- branches/aadk/config/feditor.html (original)
+++ branches/aadk/config/feditor.html Thu Apr 19 12:42:52 2007
@@ -26,6 +26,56 @@
<script>
var global_contextBeingEdited = "";
var global_fileBeingEdited = "";
+
+
+function show_createfile(){
+ _$('New_FileName').value = "";
+ var f = _$('createfile_button');
+ var tmp_left = f.offsetLeft -1;
+ var tmp_top = f.offsetTop -1 ;
+ var tmp_parent = f;
+
+ while(tmp_parent.offsetParent != document.body){
+ tmp_parent = tmp_parent.offsetParent;
+ tmp_left += tmp_parent.offsetLeft;
+ tmp_top += tmp_parent.offsetTop;
+ }
+
+ _$('CreateFile').style.left = tmp_left;
+ _$('CreateFile').style.top = tmp_top ;
+ _$('CreateFile').style.display = "" ;
+ _$('New_FileName').focus();
+
+}
+
+
+function create_file(){
+
+ var fn = _$('New_FileName').value;
+ if( fn.substr( (fn.length - 5), fn.length) != ".conf") { fn = fn+'.conf'; }
+
+ parent.astmanEngine.run_tool( "touch " + asterisk_configfolder + fn, callback = function() {
+ cancel_file();
+ gui_feedback("Created file: '" + fn + "'",'blue');
+ New_OPTION = document.createElement('option');
+ New_OPTION.text = fn ;
+ New_OPTION.value = fn ;
+ try {
+ _$('filenames').add(New_OPTION, null); // W3C way
+ }catch(ex) {
+ _$('filenames').add(New_OPTION); // IE way
+ }
+ _$('filenames').selectedIndex = _$('filenames').options.length -1 ;
+ loadfile();
+ });
+}
+
+function cancel_file(){
+ _$('CreateFile').style.display = "none" ;
+}
+
+
+
function delete_context(){
if(!confirm("Are you sure you want to delete the selected context ?")){ return true; }
@@ -357,6 +407,8 @@
<span style="margin-left: 4px;font-weight:bold;">File Editor</span>
<span style="cursor: pointer; cursor: hand;" onclick="window.location.href=window.location.href;" > <img src="images/refresh.png" title=" Refresh " border=0 > </span>
<span><select id="filenames" class="input9"></select></span>
+
+ <input id="createfile_button" type=button value="Create NewFile" class="input8" onclick="show_createfile();">
</div>
<div style="display:none; font-size:14px; font-weight:bold; font-family:helvetica,sans-serif,'trebuchet ms'; padding : 6px 0px 6px 10px;" id="div_filename">
<span id="CurrentFileName"></span>
@@ -388,5 +440,20 @@
<input type="button" value="Add" style="font-size: 8pt; border:1px solid; padding : 0px 0px 0px 0px;" onclick="add_context();">
<input type="button" value="Cancel" style="font-size: 8pt; border:1px solid; padding : 0px 0px 0px 0px;" onclick="cancel_addcontext();">
</div>
+<div id="CreateFile" style="display:none; position:absolute; z-index:1005; background-color : #C1D7EC; padding : 6px 6px 6px 10px;">
+ <table>
+ <tr> <td colspan=2 align=center><B>Create New ConfigFile</B></td>
+ </tr>
+ <tr> <td>New FileName :</td>
+ <td> <input id="New_FileName" size=20 class="input9">
+ <input type="button" value="Add" style="font-size: 8pt; border:1px solid; padding : 0px 0px 0px 0px;" onclick="create_file();">
+ <input type="button" value="Cancel" style="font-size: 8pt; border:1px solid; padding : 0px 0px 0px 0px;" onclick="cancel_file();"><BR>
+ </td>
+ </tr>
+ <tr> <td></td>
+ <td> (Ex: newfile.conf)</td>
+ </tr>
+ </table>
+</div>
<div id="sysinfohtml" style="display:none"></div>
</body>
Modified: branches/aadk/config/scripts/tooltip.js
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/scripts/tooltip.js?view=diff&rev=714&r1=713&r2=714
==============================================================================
--- branches/aadk/config/scripts/tooltip.js (original)
+++ branches/aadk/config/scripts/tooltip.js Thu Apr 19 12:42:52 2007
@@ -1,6 +1,6 @@
-var lang = 'en';
+
var tooltips = new Object;
function show_tooltip(lang, file,tip){
Modified: branches/aadk/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/users.html?view=diff&rev=714&r1=713&r2=714
==============================================================================
--- branches/aadk/config/users.html (original)
+++ branches/aadk/config/users.html Thu Apr 19 12:42:52 2007
@@ -22,6 +22,7 @@
<script src="scripts/prototype.js"></script>
<script src="scripts/rico.js"></script>
<script src="scripts/astman.js"></script>
+<script src="scripts/lang.js"></script>
<script src="scripts/tooltip.js"></script>
<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
@@ -277,6 +278,8 @@
}
}
*/
+ apply_lang('en');
+
setWindowTitle("Users");
if(window.location.href.match("sortbynames") ){
sortbynames = true;
@@ -321,7 +324,7 @@
</script>
<body id="foo" onload="localajaxinit()" bgcolor="#EFEFEF" onunload="free_mem()">
<div class="mainscreenTitleBar">
- <span style="margin-left: 4px;font-weight:bold;">User and Phone Configuration</span>
+ <span style="margin-left: 4px;font-weight:bold;"><span class="lclzn">users,0</span></span>
<span style="cursor: pointer; cursor: hand;" onclick="window.location.href=window.location.href;" > <img src="images/refresh.png" title=" Refresh " border=0 > </span>
</div>
<div class="mainscreenContentBox" id="userscontent">
Propchange: branches/asterisknow/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Apr 19 12:42:52 2007
@@ -1,1 +1,1 @@
-/trunk:1-449,489-540,542-557,559,561-577,580-586,588-703
+/trunk:1-449,489-540,542-557,559,561-577,580-586,588-713
Modified: branches/asterisknow/config/feditor.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/feditor.html?view=diff&rev=714&r1=713&r2=714
==============================================================================
--- branches/asterisknow/config/feditor.html (original)
+++ branches/asterisknow/config/feditor.html Thu Apr 19 12:42:52 2007
@@ -26,6 +26,56 @@
<script>
var global_contextBeingEdited = "";
var global_fileBeingEdited = "";
+
+
+function show_createfile(){
+ _$('New_FileName').value = "";
+ var f = _$('createfile_button');
+ var tmp_left = f.offsetLeft -1;
+ var tmp_top = f.offsetTop -1 ;
+ var tmp_parent = f;
+
+ while(tmp_parent.offsetParent != document.body){
+ tmp_parent = tmp_parent.offsetParent;
+ tmp_left += tmp_parent.offsetLeft;
+ tmp_top += tmp_parent.offsetTop;
+ }
+
+ _$('CreateFile').style.left = tmp_left;
+ _$('CreateFile').style.top = tmp_top ;
+ _$('CreateFile').style.display = "" ;
+ _$('New_FileName').focus();
+
+}
+
+
+function create_file(){
+
+ var fn = _$('New_FileName').value;
+ if( fn.substr( (fn.length - 5), fn.length) != ".conf") { fn = fn+'.conf'; }
+
+ parent.astmanEngine.run_tool( "touch " + asterisk_configfolder + fn, callback = function() {
+ cancel_file();
+ gui_feedback("Created file: '" + fn + "'",'blue');
+ New_OPTION = document.createElement('option');
+ New_OPTION.text = fn ;
+ New_OPTION.value = fn ;
+ try {
+ _$('filenames').add(New_OPTION, null); // W3C way
+ }catch(ex) {
+ _$('filenames').add(New_OPTION); // IE way
+ }
+ _$('filenames').selectedIndex = _$('filenames').options.length -1 ;
+ loadfile();
+ });
+}
+
+function cancel_file(){
+ _$('CreateFile').style.display = "none" ;
+}
+
+
+
function delete_context(){
if(!confirm("Are you sure you want to delete the selected context ?")){ return true; }
@@ -357,6 +407,8 @@
<span style="margin-left: 4px;font-weight:bold;">File Editor</span>
<span style="cursor: pointer; cursor: hand;" onclick="window.location.href=window.location.href;" > <img src="images/refresh.png" title=" Refresh " border=0 > </span>
<span><select id="filenames" class="input9"></select></span>
+
+ <input id="createfile_button" type=button value="Create NewFile" class="input8" onclick="show_createfile();">
</div>
<div style="display:none; font-size:14px; font-weight:bold; font-family:helvetica,sans-serif,'trebuchet ms'; padding : 6px 0px 6px 10px;" id="div_filename">
<span id="CurrentFileName"></span>
@@ -388,5 +440,20 @@
<input type="button" value="Add" style="font-size: 8pt; border:1px solid; padding : 0px 0px 0px 0px;" onclick="add_context();">
<input type="button" value="Cancel" style="font-size: 8pt; border:1px solid; padding : 0px 0px 0px 0px;" onclick="cancel_addcontext();">
</div>
+<div id="CreateFile" style="display:none; position:absolute; z-index:1005; background-color : #C1D7EC; padding : 6px 6px 6px 10px;">
+ <table>
+ <tr> <td colspan=2 align=center><B>Create New ConfigFile</B></td>
+ </tr>
+ <tr> <td>New FileName :</td>
+ <td> <input id="New_FileName" size=20 class="input9">
+ <input type="button" value="Add" style="font-size: 8pt; border:1px solid; padding : 0px 0px 0px 0px;" onclick="create_file();">
+ <input type="button" value="Cancel" style="font-size: 8pt; border:1px solid; padding : 0px 0px 0px 0px;" onclick="cancel_file();"><BR>
+ </td>
+ </tr>
+ <tr> <td></td>
+ <td> (Ex: newfile.conf)</td>
+ </tr>
+ </table>
+</div>
<div id="sysinfohtml" style="display:none"></div>
</body>
More information about the asterisk-gui-commits
mailing list