Added : Upload options turn off/on
This commit is contained in:
parent
55fab0b0cc
commit
d5547e120d
6 changed files with 57 additions and 18 deletions
5
sql/2.0.91~2.1.txt
Normal file
5
sql/2.0.91~2.1.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
INSERT into cb_config (name,value) VALUES
|
||||
('load_upload_form','yes'),
|
||||
('load_remote_upload_form','yes'),
|
||||
('load_embed_form','yes'),
|
||||
('load_link_video_form','yes');
|
|
@ -17,17 +17,14 @@ var imageurl = "{$imageurl}";
|
|||
<script type="text/javascript" src="{$js}/checkall.js"></script>
|
||||
<script type="text/javascript" src="{$js}/jquery.js"></script>
|
||||
<script type="text/javascript" src="{$js}/ui/jquery-ui-1.7.2.custom.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="{$js}/jquery_plugs/hover_intent.js"></script>
|
||||
<script type="text/javascript" src="{$js}/jquery_plugs/cb.tabs.js"></script>
|
||||
<script type="text/javascript" src="{$js}/jquery_plugs/cookie.js"></script>
|
||||
<script type="text/javascript" src="{$js}/jquery_plugs/timer.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="{$js}/jquery_plugs/css/jquery.tooltip.css" />
|
||||
<link rel="stylesheet" href="{$js}/jquery_plugs/css/screen.css" />
|
||||
<link rel="stylesheet" href="{$js}/jquery_plugs/css/tipsy.css" />
|
||||
<link rel="stylesheet" href="{$js}/ui/css/ui-lightness/jquery-ui-1.7.2.custom.css" />
|
||||
|
||||
<script src="{$js}/jquery_plugs/jquery.bgiframe.js" type="text/javascript"></script>
|
||||
<script src="{$js}/jquery_plugs/jquery.dimensions.js" type="text/javascript"></script>
|
||||
<script src="{$js}/jquery_plugs/jquery.tooltip.pack.js" type="text/javascript"></script>
|
||||
|
|
|
@ -308,6 +308,15 @@ $(document).ready(function(){
|
|||
<div id="div_2" class="main_page_div">
|
||||
<fieldset class="fieldset" style="border:none">
|
||||
<table width="100%" border="0" cellpadding="2" cellspacing="0" class="block">
|
||||
<tr>
|
||||
<td valign="top">Upoad Options</td>
|
||||
<td valign="top">
|
||||
{foreach from=$opt_list item=opt}
|
||||
{assign var=uploadOptId value=$opt.load_func}
|
||||
<label><input type="checkbox" name="{$uploadOptId}" {if $row.$uploadOptId=='yes'} checked="checked"{/if} value="yes"/>{$opt.title}</label>
|
||||
{/foreach}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">Use Crons</td>
|
||||
<td valign="top">
|
||||
|
|
|
@ -2347,11 +2347,20 @@
|
|||
*/
|
||||
function lang($var)
|
||||
{
|
||||
global $LANG;
|
||||
global $LANG,$Cbucket;
|
||||
|
||||
$array_str = array
|
||||
( '{title}');
|
||||
$array_replace = array
|
||||
( $Cbucket->configs['site_title'] );
|
||||
|
||||
if($LANG[$var])
|
||||
return $LANG[$var];
|
||||
else
|
||||
return $var;
|
||||
{
|
||||
return str_replace($array_str,$array_replace,$LANG[$var]);
|
||||
}else
|
||||
{
|
||||
return str_replace($array_str,$array_replace,$var);
|
||||
}
|
||||
}
|
||||
function smarty_lang($param)
|
||||
{
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,26 +5,45 @@
|
|||
|
||||
{if $step =='1'}
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() { show_menu('file_upload_div',true) })
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
{assign var='no_upload' value='yes'}
|
||||
{assign var=opt_list value=$Upload->load_upload_options()}
|
||||
<ul class="upload_opts clearfix">
|
||||
{foreach from=$opt_list item=opt key=divid}
|
||||
<li class="upload_opt_head moveL {$divid}" onclick="show_menu('{$divid}',false)">{$opt.title}</li>
|
||||
|
||||
{* Checking weather to show uploadin option to user or not *}
|
||||
{assign var=uploadOptId value=$opt.load_func}
|
||||
{if $Cbucket->configs.$uploadOptId=='yes'}
|
||||
{assign var='no_upload' value='no'}
|
||||
<li class="upload_opt_head moveL {$divid}" onclick="show_menu('{$divid}',false)">{$opt.title}</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
<div class="clear"></div>
|
||||
{foreach from=$opt_list item=opt key=divid}
|
||||
<div class="clear"></div>
|
||||
<div class="uploadFormContent">
|
||||
{foreach from=$opt_list item=opt key=divid}
|
||||
{* Checking weather to show uploadin option to user or not *}
|
||||
{assign var=uploadOptId value=$opt.load_func}
|
||||
{if $Cbucket->configs.$uploadOptId=='yes'}
|
||||
<div class="upload_opt" id="{$divid}" style="display:none">
|
||||
{load_form name=$opt.load_func button_class='cb_button_2' class='upload_form'}
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
|
||||
{if $no_upload=='yes'}
|
||||
<div style="background-color:#FFEAEB; font-size:13pt; padding:5px">
|
||||
{lang code='no_upload_opt'}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{literal}
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
var formToLoad = $('.uploadFormContent .upload_opt:first-child').attr('id');
|
||||
show_menu(formToLoad,true) })
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue