Change in the structure of the "theme admin" folder.
parent
b2b0791489
commit
c532259cef
|
|
@ -180,33 +180,33 @@ if ($user->isAuthenticated()) {
|
||||||
switch ($_GET["new"]) {
|
switch ($_GET["new"]) {
|
||||||
case "post":
|
case "post":
|
||||||
$form->set('editTitle',$title);
|
$form->set('editTitle',$title);
|
||||||
$theme->set('form',$form->fetch(Absolute_Path.'admin/themes/admin/template_add_post.htm'));
|
$theme->set('form',$form->fetch(Absolute_Path.'admin/themes/admin/parts/template_add_post.htm'));
|
||||||
break;
|
break;
|
||||||
case "photo":
|
case "photo":
|
||||||
$url = str_replace("../", $conf->urlGelato."/", $url);
|
$url = str_replace("../", $conf->urlGelato."/", $url);
|
||||||
$form->set('editUrl',$url);
|
$form->set('editUrl',$url);
|
||||||
$theme->set('form',$form->fetch(Absolute_Path.'admin/themes/admin/template_add_photo.htm'));
|
$theme->set('form',$form->fetch(Absolute_Path.'admin/themes/admin/parts/template_add_photo.htm'));
|
||||||
break;
|
break;
|
||||||
case "quote":
|
case "quote":
|
||||||
$form->set('editTitle',$title);
|
$form->set('editTitle',$title);
|
||||||
$theme->set('form',$form->fetch(Absolute_Path.'admin/themes/admin/template_add_quote.htm'));
|
$theme->set('form',$form->fetch(Absolute_Path.'admin/themes/admin/parts/template_add_quote.htm'));
|
||||||
break;
|
break;
|
||||||
case "url":
|
case "url":
|
||||||
$form->set('editTitle',$title);
|
$form->set('editTitle',$title);
|
||||||
$form->set('editUrl',$url);
|
$form->set('editUrl',$url);
|
||||||
$theme->set('form',$form->fetch(Absolute_Path.'admin/themes/admin/template_add_link.htm'));
|
$theme->set('form',$form->fetch(Absolute_Path.'admin/themes/admin/parts/template_add_link.htm'));
|
||||||
break;
|
break;
|
||||||
case "conversation":
|
case "conversation":
|
||||||
$form->set('editTitle',$title);
|
$form->set('editTitle',$title);
|
||||||
$theme->set('form',$form->fetch(Absolute_Path.'admin/themes/admin/template_add_conversation.htm'));
|
$theme->set('form',$form->fetch(Absolute_Path.'admin/themes/admin/parts/template_add_conversation.htm'));
|
||||||
break;
|
break;
|
||||||
case "video":
|
case "video":
|
||||||
$form->set('editUrl',$url);
|
$form->set('editUrl',$url);
|
||||||
$theme->set('form',$form->fetch(Absolute_Path.'admin/themes/admin/template_add_video.htm'));
|
$theme->set('form',$form->fetch(Absolute_Path.'admin/themes/admin/parts/template_add_video.htm'));
|
||||||
break;
|
break;
|
||||||
case "mp3":
|
case "mp3":
|
||||||
$form->set('editUrl',$url);
|
$form->set('editUrl',$url);
|
||||||
$theme->set('form',$form->fetch(Absolute_Path.'admin/themes/admin/template_add_mp3.htm'));
|
$theme->set('form',$form->fetch(Absolute_Path.'admin/themes/admin/parts/template_add_mp3.htm'));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
<div id="photo_upload">
|
<div id="photo_upload">
|
||||||
<label for="description">Photo</label>
|
<label for="description">Photo</label>
|
||||||
<br /><input type="file" name="photo" id="photo" accept="image/gif,image/jpeg,image/jpg,image/png"/>
|
<br /><input type="file" name="photo" id="photo" accept="image/gif,image/jpeg,image/jpg,image/png"/>
|
||||||
|
|
@ -30,15 +28,13 @@
|
||||||
<input type="hidden" name="date" id="date" value="{date}" />
|
<input type="hidden" name="date" id="date" value="{date}" />
|
||||||
<input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
<input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('#photo_url').css('display','none');
|
$('#photo_url').css('display','none');
|
||||||
|
|
||||||
$("#autosave").validate({
|
$("#autosave").validate({
|
||||||
rules: {
|
rules: {
|
||||||
photo: {
|
photo: {
|
||||||
required: function() {
|
required: function() {
|
||||||
return ($('#photo_upload').css('display')!= 'none') ? true : false;
|
return ($('#photo_upload').css('display')!= 'none') ? true : false;
|
||||||
},
|
},
|
||||||
accept: "(jpe?g|gif|png)"
|
accept: "(jpe?g|gif|png)"
|
||||||
|
|
@ -64,7 +60,7 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
$("#photo_url a.linkFrm").click( function() {
|
$("#photo_url a.linkFrm").click( function() {
|
||||||
$('#photo_url').css('display','none');
|
$('#photo_url').css('display','none');
|
||||||
$('#photo_upload').css('display','block');
|
$('#photo_upload').css('display','block');
|
||||||
|
|
@ -72,5 +68,4 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
</script>
|
||||||
</script>
|
|
||||||
|
|
@ -6,4 +6,5 @@
|
||||||
<span class="option">{Caption}</span>
|
<span class="option">{Caption}</span>
|
||||||
<p><a {Effect}><img src="{PhotoURL}" alt="{PhotoAlt}" /></a></a></p>
|
<p><a {Effect}><img src="{PhotoURL}" alt="{PhotoAlt}" /></a></a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Loading…
Reference in New Issue