diff --git a/livesupport/modules/htmlUI/var/formmask/general.inc.php b/livesupport/modules/htmlUI/var/formmask/general.inc.php index d9caa5683..1a0151b85 100755 --- a/livesupport/modules/htmlUI/var/formmask/general.inc.php +++ b/livesupport/modules/htmlUI/var/formmask/general.inc.php @@ -297,6 +297,12 @@ $ui_fmask = array( 'element' => 'folderId', 'type' => 'hidden' ), + array( + 'element' => 'title', + 'type' => 'text', + 'label' => 'Title', + 'required' => TRUE + ), array( 'element' => 'url', 'type' => 'text', diff --git a/livesupport/modules/htmlUI/var/templates/file/edit.tpl b/livesupport/modules/htmlUI/var/templates/file/edit.tpl index 8c7c327e4..7c19767e3 100755 --- a/livesupport/modules/htmlUI/var/templates/file/edit.tpl +++ b/livesupport/modules/htmlUI/var/templates/file/edit.tpl @@ -44,24 +44,38 @@ function showData() { +{/literal} + {if $editItem.id && $editItem.type == 'file'} + alert('Sorry, function temporary disabled'); + return false; + {/if} +{literal} document.getElementById('div_Data').style.visibility='visible'; document.getElementById('div_Data').style.height=''; document.getElementById('div_MData').style.visibility='hidden'; document.getElementById('div_MData').style.height='0'; } -function showMData() -{ - document.getElementById('div_MData').style.visibility='visible'; - document.getElementById('div_MData').style.height=''; - document.getElementById('div_Data').style.visibility='hidden'; - document.getElementById('div_Data').style.height='0'; -} {/literal} {if $editItem.id} + {literal} + function showMData() + { + document.getElementById('div_MData').style.visibility='visible'; + document.getElementById('div_MData').style.height=''; + document.getElementById('div_Data').style.visibility='hidden'; + document.getElementById('div_Data').style.height='0'; + } document.getElementById('div_Data').style.visibility='hidden'; document.getElementById('div_Data').style.height='0'; + {/literal} {else} + {literal} + function showMData() + { + alert ('First Data'); + } + {/literal} document.getElementById('div_MData').style.visibility='hidden'; document.getElementById('div_MData').style.height='0'; {/if} diff --git a/livesupport/modules/htmlUI/var/ui_handler.class.php b/livesupport/modules/htmlUI/var/ui_handler.class.php index 385c65a90..16f5bf229 100644 --- a/livesupport/modules/htmlUI/var/ui_handler.class.php +++ b/livesupport/modules/htmlUI/var/ui_handler.class.php @@ -167,7 +167,7 @@ class uiHandler extends uiBase { $this->transMData($r); $this->redirUrl = UI_BROWSER."?act=editFile&id=$r"; - $this->_retMsg('File saved'); + $this->_retMsg('Audioclip Data saved'); return $r; } @@ -214,17 +214,17 @@ class uiHandler extends uiBase { $this->redirUrl = UI_BROWSER."?act=editWebstream&id=".$id; return FALSE; } - $r = $this->gb->storeWebstream($folderId, date('Y-m-d H:i:s'), NULL, $this->sessid, NULL, $formdata['url']); + $r = $this->gb->storeWebstream($folderId, $formdata['title'], NULL, $this->sessid, NULL, $formdata['url']); if(PEAR::isError($r)) { $this->_retMsg($r->getMessage()); $this->redirUrl = UI_BROWSER."?act=editWebstream&id=".$id; return FALSE; } $length = $this->_twoDigits($formdata['length']['H']).':'.$this->_twoDigits($formdata['length']['i']).':'.$this->_twoDigits($formdata['length']['s']).'.000000'; - $this->gb->setMDataValue($r, UI_MDATA_KEY_TITLE, $this->sessid, $data['title']); + $this->gb->setMDataValue($r, UI_MDATA_KEY_TITLE, $this->sessid, $formdata['title']); $this->gb->setMDataValue($r, UI_MDATA_KEY_DURATION, $this->sessid, $length); $this->redirUrl = UI_BROWSER."?act=editWebstream&id=$r"; - $this->_retMsg('Stream saved'); + $this->_retMsg('Stream Data saved'); return $r; } @@ -237,9 +237,10 @@ class uiHandler extends uiBase { return FALSE; } $length = $this->_twoDigits($formdata['length']['H']).':'.$this->_twoDigits($formdata['length']['i']).':'.$this->_twoDigits($formdata['length']['s']).'.000000'; + $this->gb->setMDataValue($id, UI_MDATA_KEY_TITLE, $this->sessid, $formdata['title']); $this->gb->setMDataValue($id, UI_MDATA_KEY_URL, $this->sessid, $formdata['url']); $this->gb->setMDataValue($id, UI_MDATA_KEY_DURATION, $this->sessid, $length); - $this->_retMsg('Stream changed'); + $this->_retMsg('Stream Data changed'); $this->redirUrl = UI_BROWSER.'?act=editWebstream&id='.$formdata['id']; }