more work on photo upload
This commit is contained in:
parent
11ccf253e2
commit
2982212797
@ -540,12 +540,8 @@ function photos_content(&$a) {
|
|||||||
'addon_text' => $uploader,
|
'addon_text' => $uploader,
|
||||||
'default_upload' => true);
|
'default_upload' => true);
|
||||||
|
|
||||||
|
|
||||||
call_hooks('photo_upload_form',$ret);
|
call_hooks('photo_upload_form',$ret);
|
||||||
|
|
||||||
$default_upload = '<input id="photos-upload-choose" type="file" name="userfile" /> <div class="photos-upload-submit-wrapper" >
|
|
||||||
<input type="submit" name="submit" value="' . t('Submit') . '" id="photos-upload-submit" /> </div>';
|
|
||||||
|
|
||||||
/* Show space usage */
|
/* Show space usage */
|
||||||
|
|
||||||
$r = q("select sum(size) as total from photo where aid = %d and scale = 0 ",
|
$r = q("select sum(size) as total from photo where aid = %d and scale = 0 ",
|
||||||
@ -584,15 +580,17 @@ function photos_content(&$a) {
|
|||||||
'$sessid' => session_id(),
|
'$sessid' => session_id(),
|
||||||
'$usage' => $usage_message,
|
'$usage' => $usage_message,
|
||||||
'$nickname' => $a->data['channel']['channel_address'],
|
'$nickname' => $a->data['channel']['channel_address'],
|
||||||
'$newalbum' => t('Enter a new album name or select an existing one:'),
|
'$newalbum_label' => t('Enter a new album name'),
|
||||||
|
'$newalbum_placeholder' => t('or select an existing one (doubleclick)'),
|
||||||
'$nosharetext' => t('Do not show a status post for this upload'),
|
'$nosharetext' => t('Do not show a status post for this upload'),
|
||||||
'$albums' => $albums['albums'],
|
'$albums' => $albums['albums'],
|
||||||
'$selname' => $selname,
|
'$selname' => $selname,
|
||||||
'$permissions' => t('Permissions'),
|
'$permissions' => t('Permissions'),
|
||||||
'$aclselect' => $aclselect_e,
|
'$aclselect' => $aclselect_e,
|
||||||
'$uploader' => $ret['addon_text'],
|
'$uploader' => $ret['addon_text'],
|
||||||
'$default' => (($ret['default_upload']) ? $default_upload : ''),
|
'$default' => (($ret['default_upload']) ? true : false),
|
||||||
'$uploadurl' => $ret['post_url']
|
'$uploadurl' => $ret['post_url'],
|
||||||
|
'$submit' => t('Submit')
|
||||||
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -22,24 +22,16 @@
|
|||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#photos-upload-noshare {
|
#photos-upload-album {
|
||||||
margin-bottom: 10px;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#photos-upload-spacer,
|
|
||||||
#photos-upload-new-end {
|
|
||||||
margin-top: 25px;
|
|
||||||
}
|
|
||||||
#photos-upload-new-end, #photos-upload-exist-end {
|
#photos-upload-new-end, #photos-upload-exist-end {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
#photos-upload-exist-end {
|
#photos-upload-exist-end {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
#photos-upload-submit {
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#photos-upload-select-files-text {
|
#photos-upload-select-files-text {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
@ -63,8 +55,9 @@
|
|||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#photo-edit-caption-end, #photo-edit-tags-end, #photo-edit-albumname-end, #photo-edit-rotate-end {
|
#photo-edit-caption-end, #photo-edit-tags-end, #photo-edit-albumname-end, #photo-edit-rotate-end, #photos-upload-perms-end, #photos-upload-noshare-end{
|
||||||
clear: both;
|
clear: both;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#photo-edit-rotate-end {
|
#photo-edit-rotate-end {
|
||||||
|
@ -26,9 +26,6 @@
|
|||||||
/* search */
|
/* search */
|
||||||
|
|
||||||
#search-text {
|
#search-text {
|
||||||
border: 1px solid #ccc;
|
|
||||||
padding: 5px;
|
|
||||||
line-height: 1.5;
|
|
||||||
border-top-right-radius: 0px;
|
border-top-right-radius: 0px;
|
||||||
border-bottom-right-radius: 0px;
|
border-bottom-right-radius: 0px;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: arial,freesans,sans-serif;
|
font-family: sans-serif, arial, freesans;
|
||||||
font-size: $body_font_size;
|
font-size: $body_font_size;
|
||||||
background-color: $bgcolour;
|
background-color: $bgcolour;
|
||||||
background-image: url('$background_image');
|
background-image: url('$background_image');
|
||||||
@ -37,7 +37,7 @@ h5, .h5, h6, .h6 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.jslider {
|
.jslider {
|
||||||
font-family: arial,freesans,sans-serif;
|
font-family: sans-serif, arial, freesans;
|
||||||
}
|
}
|
||||||
|
|
||||||
abbr {
|
abbr {
|
||||||
@ -84,17 +84,19 @@ a.btn-success {
|
|||||||
input[type="text"],
|
input[type="text"],
|
||||||
input[type="password"],
|
input[type="password"],
|
||||||
input[type="submit"],
|
input[type="submit"],
|
||||||
|
input[type="file"],
|
||||||
select,
|
select,
|
||||||
textarea {
|
textarea {
|
||||||
font-family: arial,freesans,sans-serif;
|
font-family: sans-serif, arial, freesans;
|
||||||
font-size: $body_font_size;
|
font-size: $body_font_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
|
padding: 5px;
|
||||||
|
line-height: 1.5;
|
||||||
border: 1px solid $input_border;
|
border: 1px solid $input_border;
|
||||||
-moz-border-radius: $radiuspx;
|
-moz-border-radius: $radiuspx;
|
||||||
border-radius: $radiuspx;
|
border-radius: $radiuspx;
|
||||||
padding: 3px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="submit"] {
|
input[type="submit"] {
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
<div class="section-content-wrapper">
|
<div class="section-content-wrapper">
|
||||||
<form action="photos/{{$nickname}}" enctype="multipart/form-data" method="post" name="photos-upload-form" id="photos-upload-form">
|
<form action="photos/{{$nickname}}" enctype="multipart/form-data" method="post" name="photos-upload-form" id="photos-upload-form">
|
||||||
<input type="hidden" id="photos-upload-source" name="source" value="photos" />
|
<input type="hidden" id="photos-upload-source" name="source" value="photos" />
|
||||||
<div id="photos-album-name-label" >
|
|
||||||
<label id="photos-upload-newalbum-text" for="photos-upload-newalbum">{{$newalbum}}</label>
|
|
||||||
</div>
|
<div class="form-group">
|
||||||
<div id="photos-album-name-input">
|
<label for="photos-upload-album">{{$newalbum_label}}</label>
|
||||||
<input id="photos-upload-newalbum" type="text" value="{{$selname}}" name="newalbum" list="dl-photo-upload" />
|
<input type="text" class="form-control" id="photos-upload-album" placeholder="{{$newalbum_placeholder}}" value="{{$selname}}" list="dl-photo-upload">
|
||||||
<datalist id="dl-photo-upload">
|
<datalist id="dl-photo-upload">
|
||||||
{{foreach $albums as $al}}
|
{{foreach $albums as $al}}
|
||||||
{{if $al.text}}
|
{{if $al.text}}
|
||||||
@ -22,27 +22,38 @@
|
|||||||
</datalist>
|
</datalist>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{$aclselect}}
|
||||||
|
|
||||||
|
{{if $default}}
|
||||||
|
<div class="form-group pull-left">
|
||||||
|
<input id="photos-upload-choose" type="file" name="userfile" />
|
||||||
|
</div>
|
||||||
|
<div class="btn-group pull-right">
|
||||||
|
<button class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" onclick="return false;">
|
||||||
|
<i id="jot-perms-icon" class="icon-{{$lockstate}} jot-icons"></i>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-primary btn-sm" type="submit" name="submit" id="photos-upload-submit">{{$submit}}</button>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div id="photos-upload-new-end"></div>
|
<div id="photos-upload-new-end"></div>
|
||||||
|
|
||||||
<div id="photos-upload-noshare-div" class="photos-upload-noshare-div" >
|
<div class="form-group" id="photos-upload-noshare">
|
||||||
<input id="photos-upload-noshare" type="checkbox" name="not_visible" value="1" />
|
<label id="photos-upload-noshare-text" for="photos-upload-noshare" >
|
||||||
<label id="photos-upload-noshare-text" for="photos-upload-noshare" >{{$nosharetext}}</label>
|
<input id="photos-upload-noshare" type="checkbox" name="not_visible" value="1" /> {{$nosharetext}}
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{if $uploader}}
|
||||||
|
<div id="photos-upload-noshare-end"></div>
|
||||||
<div id="photos-upload-perms" class="photos-upload-perms" >
|
<div id="photos-upload-perms" class="photos-upload-perms" >
|
||||||
<span id="jot-perms-icon" class="icon-{{$lockstate}}" ></span>
|
<span id="jot-perms-icon" class="icon-{{$lockstate}}" ></span>
|
||||||
<button class="btn btn-default btn-xs" data-toggle="modal" data-target="#aclModal" onclick="return false;">{{$permissions}}</button>
|
<button class="btn btn-default btn-xs" data-toggle="modal" data-target="#aclModal" onclick="return false;">{{$permissions}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{$aclselect}}
|
|
||||||
|
|
||||||
<div id="photos-upload-perms-end"></div>
|
<div id="photos-upload-perms-end"></div>
|
||||||
|
|
||||||
<div id="photos-upload-spacer"></div>
|
|
||||||
|
|
||||||
{{$uploader}}
|
{{$uploader}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{$default}}
|
|
||||||
|
|
||||||
<div class="photos-upload-end" ></div>
|
<div class="photos-upload-end" ></div>
|
||||||
</form>
|
</form>
|
||||||
|
Reference in New Issue
Block a user