diff --git a/livesupport/modules/htmlUI/var/conf.php b/livesupport/modules/htmlUI/var/conf.php
index 28394563d..040940be7 100644
--- a/livesupport/modules/htmlUI/var/conf.php
+++ b/livesupport/modules/htmlUI/var/conf.php
@@ -23,7 +23,7 @@
Author : $Author: sebastian $
- Version : $Revision: 1.20 $
+ Version : $Revision: 1.21 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/htmlUI/var/Attic/conf.php,v $
------------------------------------------------------------------------------*/
@@ -149,4 +149,5 @@ define('UI_BROWSE_SESSNAME', 'L_BROWSE');
define('UI_MDATA_KEY_TITLE', 'dc:title');
define('UI_MDATA_KEY_ARTIST', 'dc:creator');
define('UI_MDATA_KEY_DURATION', 'dcterms:extent');
+define('UI_MDATA_KEY_URL', 'ls:url');
?>
\ No newline at end of file
diff --git a/livesupport/modules/htmlUI/var/formmask/general.inc.php b/livesupport/modules/htmlUI/var/formmask/general.inc.php
index d48cc0104..d9caa5683 100755
--- a/livesupport/modules/htmlUI/var/formmask/general.inc.php
+++ b/livesupport/modules/htmlUI/var/formmask/general.inc.php
@@ -257,7 +257,7 @@ $ui_fmask = array(
)
),
- 'uploadFile' => array(
+ 'file' => array(
array(
'element' => 'act',
'type' => 'hidden'
@@ -266,6 +266,10 @@ $ui_fmask = array(
'element' => 'id',
'type' => 'hidden'
),
+ array(
+ 'element' => 'folderId',
+ 'type' => 'hidden'
+ ),
array(
'element' => 'mediafile',
'type' => 'file',
@@ -280,7 +284,7 @@ $ui_fmask = array(
)
),
- 'addWebstream' => array(
+ 'webstream' => array(
array(
'element' => 'act',
'type' => 'hidden',
@@ -290,17 +294,12 @@ $ui_fmask = array(
'type' => 'hidden'
),
array(
- 'element' => 'name',
- 'type' => 'text',
- 'label' => 'Name',
- 'required' => TRUE,
- 'rule' => 'alphanumeric',
- 'rulemsg' => 'Name must be alphanumeric'
+ 'element' => 'folderId',
+ 'type' => 'hidden'
),
array(
'element' => 'url',
'type' => 'text',
- 'default' => 'http://',
'label' => 'Stream URL',
'required' => TRUE,
'requiredmsg'=> 'URL is missing',
@@ -309,12 +308,10 @@ $ui_fmask = array(
'rulemsg' => 'URL seems invalid',
),
array(
- 'element' => 'duration',
+ 'element' => 'length',
'type' => 'date',
- 'label' => 'Duration',
- 'options' => array(
- 'format' => 'His',
- )
+ 'label' => 'Length
Leave zero for Live Stream',
+ 'options' => array('format' => 'His'),
),
array(
'element' => 'Submit',
diff --git a/livesupport/modules/htmlUI/var/html/styles.css b/livesupport/modules/htmlUI/var/html/styles.css
index 9494a5964..ab6db92a2 100755
--- a/livesupport/modules/htmlUI/var/html/styles.css
+++ b/livesupport/modules/htmlUI/var/html/styles.css
@@ -86,13 +86,6 @@
margin-top: 10px;
}
-#uploadform {
- width: 800px;
- border-style : dotted;
- padding : 5px;
- margin-top: 10px;
-}
-
#searchform {
width: 800px;
border-style : dotted;
@@ -124,8 +117,15 @@
margin-top: 10px;
}
-#metadataform {;
- width: 800px;
+#uploadform {
+ width: 780px;
+ border-style : dotted;
+ padding : 5px;
+ margin-top: 10px;
+}
+
+#metadataform {
+ width: 780px;
border-style : dotted;
padding : 5px;
margin-top: 10px;
diff --git a/livesupport/modules/htmlUI/var/html/ui_browser.php b/livesupport/modules/htmlUI/var/html/ui_browser.php
index 71729dae5..5e4d2f670 100644
--- a/livesupport/modules/htmlUI/var/html/ui_browser.php
+++ b/livesupport/modules/htmlUI/var/html/ui_browser.php
@@ -56,10 +56,10 @@ if ($uiBrowser->userid) {
#$Smarty->assign('PLid', $uiBrowser->PLAYLIST->activeId);
switch ($_REQUEST['act']){
- case "fileBrowse":
+ case "fileList":
$Smarty->assign('structure', $uiBrowser->getStructure($uiBrowser->fid));
- $Smarty->assign('fileBrowse', TRUE);
+ $Smarty->assign('fileList', TRUE);
if ($_REQUEST['tree']=='Y')
$Smarty->assign('showTree', TRUE);
else
@@ -71,7 +71,7 @@ if ($uiBrowser->userid) {
$Smarty->assign('structure', $uiBrowser->getStructure($uiBrowser->id));
$Smarty->assign('permissions', $uiBrowser->permissions($uiBrowser->id));
- $Smarty->assign('fileBrowse', TRUE);
+ $Smarty->assign('fileList', TRUE);
break;
@@ -82,26 +82,15 @@ if ($uiBrowser->userid) {
break;
- case "uploadFile":
+ case "editFile":
$Smarty->assign('structure', $uiBrowser->getStructure($uiBrowser->id));
- $Smarty->assign('editMetaData', $uiBrowser->editMetaData($uiBrowser->id, TRUE));
- # booth masks on one page
- $Smarty->assign('uploadform', $uiBrowser->uploadFile($ui_fmask['uploadFile'], $uiBrowser->id, $_REQUEST['replace']));
+ $Smarty->assign('editItem', array('type' => 'file', 'id' => $_REQUEST['id'], 'folderId' => $uiBrowser->fid));
break;
- case "addWebstream":
+ case "editWebstream":
$Smarty->assign('structure', $uiBrowser->getStructure($uiBrowser->id));
- $Smarty->assign('uploadform', $uiBrowser->addWebstream($ui_fmask['addWebstream'], $uiBrowser->id, $_REQUEST['replace']));
- # booth masks on one page
- $Smarty->assign('editMetaData', $uiBrowser->editMetaData($uiBrowser->id, TRUE));
- break;
-
-
- case "editMetaData":
- $Smarty->assign('structure', $uiBrowser->getStructure($uiBrowser->id));
-
- $Smarty->assign('editMetaData', $uiBrowser->editMetaData($uiBrowser->id, TRUE));
+ $Smarty->assign('editItem', array('type' => 'webstream', 'id' => $_REQUEST['id'], 'folderId' => $uiBrowser->fid));
break;
@@ -161,11 +150,6 @@ if ($uiBrowser->userid) {
break;
case "PL.simpleManagement":
- if ($uiBrowser->PLAYLIST->get() === FALSE) {
- if (($ui_tmpid = $uiBrowser->PLAYLIST->create($_REQUEST['id'])) !== FALSE) {
- $uiBrowser->SCRATCHPAD->addItem($ui_tmpid);
- }
- }
$Smarty->assign('PL_simpleManagement', TRUE);
break;
}
diff --git a/livesupport/modules/htmlUI/var/html/ui_handler.php b/livesupport/modules/htmlUI/var/html/ui_handler.php
index 634e067eb..d5fe49b3c 100644
--- a/livesupport/modules/htmlUI/var/html/ui_handler.php
+++ b/livesupport/modules/htmlUI/var/html/ui_handler.php
@@ -4,8 +4,10 @@ require dirname(__FILE__).'/../ui_handler_init.php';
switch($_REQUEST['act']){
case "login":
- if ($uiHandler->login($_REQUEST, $ui_fmask["login"]) === TRUE)
+ if ($uiHandler->login($_REQUEST, $ui_fmask["login"]) === TRUE) {
+ #$uiHandler->checkSystemPrefs();
$uiHandler->PLAYLIST->loadLookedFromPref();
+ }
break;
case "logout":
@@ -26,29 +28,24 @@ switch($_REQUEST['act']){
break;
case "uploadFile":
- if ($ui_tmpid = $uiHandler->uploadFile(array_merge($_REQUEST, $_FILES), $uiHandler->id, $ui_fmask["uploadFile"]))
+ if ($ui_tmpid = $uiHandler->uploadFile(array_merge($_REQUEST, $_FILES), $ui_fmask["file"]))
$uiHandler->SCRATCHPAD->addItem($ui_tmpid);
break;
case "replaceFile":
$ui_tmpgunid = $uiHandler->gb->_gunidFromId($uiHandler->id);
if ($uiHandler->delete($uiHandler->id) === TRUE) {
- $ui_tmpid = $uiHandler->uploadFile(array_merge($_REQUEST, $_FILES), $uiHandler->pid, $ui_fmask["uploadFile"], $ui_tmpgunid);
+ $ui_tmpid = $uiHandler->uploadFile(array_merge($_REQUEST, $_FILES), $uiHandler->pid, $ui_fmask["file"], $ui_tmpgunid);
$uiHandler->SCRATCHPAD->removeItems($uiHandler->id);
$uiHandler->SCRATCHPAD->addItem($ui_tmpid);
}
break;
- case "addWebstream":
- if ($ui_tmpid = $uiHandler->addWebstream($_REQUEST, $uiHandler->id, $ui_fmask['addWebstream']))
- $uiHandler->SCRATCHPAD->addItem($ui_tmpid);
- break;
-
- case "replaceWebstream":
- $ui_tmpgunid = $uiHandler->gb->_gunidFromId($uiHandler->id);
- if ($uiHandler->delete($uiHandler->id) == TRUE) {
- $ui_tmpid = $uiHandler->addWebstream($_REQUEST, $uiHandler->pid, $ui_fmask['addWebstream'], $ui_tmpgunid);
- $uiHandler->SCRATCHPAD->removeItems($uiHandler->id);
+ case "editWebstream":
+ if ($_REQUEST['id']) {
+ $uiHandler->editWebstream($_REQUEST, $ui_fmask['webstream']);
+ } else {
+ $ui_tmpid = $uiHandler->addWebstream($_REQUEST, $ui_fmask['webstream']);
$uiHandler->SCRATCHPAD->addItem($ui_tmpid);
}
break;
diff --git a/livesupport/modules/htmlUI/var/templates/fileBrowse/edit.tpl b/livesupport/modules/htmlUI/var/templates/file/edit.tpl
similarity index 100%
rename from livesupport/modules/htmlUI/var/templates/fileBrowse/edit.tpl
rename to livesupport/modules/htmlUI/var/templates/file/edit.tpl
diff --git a/livesupport/modules/htmlUI/var/templates/file/fileform.tpl b/livesupport/modules/htmlUI/var/templates/file/fileform.tpl
new file mode 100755
index 000000000..e781c3047
--- /dev/null
+++ b/livesupport/modules/htmlUI/var/templates/file/fileform.tpl
@@ -0,0 +1,9 @@
+{UIBROWSER->fileForm id=$editItem.id folderId=$editItem.folderId assign="_uploadform"}
+
+