make PM expiry UI match the main post editor, e.g. JS input triggered by an icon rather than a scary looking text field
This commit is contained in:
parent
7381326b7a
commit
cb37c0ce14
@ -272,7 +272,8 @@ function message_content(&$a) {
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||
'$nickname' => $channel['channel_address'],
|
||||
'$linkurl' => t('Please enter a link URL:')
|
||||
'$linkurl' => t('Please enter a link URL:'),
|
||||
'$expireswhen' => t('Expires YYYY-MM-DD HH:MM')
|
||||
));
|
||||
|
||||
$preselect = (isset($a->argv[2])?array($a->argv[2]):false);
|
||||
@ -324,8 +325,9 @@ function message_content(&$a) {
|
||||
'$insert' => t('Insert web link'),
|
||||
'$wait' => t('Please wait'),
|
||||
'$submit' => t('Submit'),
|
||||
'$expires' => t('Expires: (leave blank for never)'),
|
||||
'$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? '1' : ''),
|
||||
'$defexpire' => '',
|
||||
'$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? 'block' : 'none'),
|
||||
'$expires' => t('Set expiration date'),
|
||||
));
|
||||
|
||||
return $o;
|
||||
@ -401,7 +403,8 @@ function message_content(&$a) {
|
||||
'$nickname' => $channel['channel_addr'],
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||
'$linkurl' => t('Please enter a link URL:')
|
||||
'$linkurl' => t('Please enter a link URL:'),
|
||||
'$expireswhen' => t('Expires YYYY-MM-DD HH:MM')
|
||||
));
|
||||
|
||||
|
||||
@ -500,8 +503,9 @@ function message_content(&$a) {
|
||||
'$insert' => t('Insert web link'),
|
||||
'$submit' => t('Submit'),
|
||||
'$wait' => t('Please wait'),
|
||||
'$expires' => t('Expires: (leave blank for never)'),
|
||||
'$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? '1' : ''),
|
||||
'$defexpire' => '',
|
||||
'$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? 'block' : 'none'),
|
||||
'$expires' => t('Set expiration date'),
|
||||
));
|
||||
|
||||
return $o;
|
||||
|
@ -1711,11 +1711,13 @@ tr.mceLast {
|
||||
#prvmail-upload-wrapper,
|
||||
#prvmail-attach-wrapper,
|
||||
#prvmail-link-wrapper,
|
||||
#prvmail-expire-wrapper,
|
||||
#prvmail-rotator-wrapper {
|
||||
float: left;
|
||||
margin-top: 10px;
|
||||
margin-right: 10px;
|
||||
width: 24px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#prvmail-end {
|
||||
|
@ -85,6 +85,13 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
function prvmailGetExpiry() {
|
||||
reply = prompt("{{$expireswhen}}", $('#inp-prvmail-expires').val());
|
||||
if(reply && reply.length) {
|
||||
$('#inp-prvmail-expires').val(reply);
|
||||
}
|
||||
}
|
||||
|
||||
function linkdropper(event) {
|
||||
var linkFound = event.dataTransfer.types.contains("text/uri-list");
|
||||
if(linkFound)
|
||||
|
@ -14,20 +14,17 @@
|
||||
{{$select}}
|
||||
{{/if}}
|
||||
|
||||
<input type="hidden" id="inp-prvmail-expires" name="expires" value="{{$defexpire}}" />
|
||||
|
||||
<div id="prvmail-subject-label">{{$subject}}</div>
|
||||
<input type="text" size="64" maxlength="255" id="prvmail-subject" name="subject" value="{{$subjtxt}}" {{$readonly}} tabindex="11" />
|
||||
|
||||
{{if $feature_expire}}
|
||||
<div id="prvmail-expires-label">{{$expires}}</div>
|
||||
<input type="text" size="64" maxlength="255" id="prvmail-expires" name="expires" value="" tabindex="12" />
|
||||
{{/if}}
|
||||
|
||||
<div id="prvmail-message-label">{{$yourmessage}}</div>
|
||||
<textarea rows="8" cols="72" class="prvmail-text" id="prvmail-text" name="body" tabindex="13">{{$text}}</textarea>
|
||||
<textarea rows="8" cols="72" class="prvmail-text" id="prvmail-text" name="body" tabindex="12">{{$text}}</textarea>
|
||||
|
||||
|
||||
<div id="prvmail-submit-wrapper" >
|
||||
<input type="submit" id="prvmail-submit" name="submit" value="{{$submit}}" tabindex="14" />
|
||||
<input type="submit" id="prvmail-submit" name="submit" value="{{$submit}}" tabindex="13" />
|
||||
<div id="prvmail-upload-wrapper" >
|
||||
<i id="prvmail-upload" class="icon-camera jot-icons" title="{{$upload}}"></i>
|
||||
</div>
|
||||
@ -36,10 +33,15 @@
|
||||
<i id="prvmail-attach" class="icon-paper-clip jot-icons" title="{{$attach}}"></i>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="prvmail-link-wrapper" >
|
||||
<i id="prvmail-link" class="icon-link jot-icons" title="{{$insert}}" onclick="jotGetLink(); return false;"></i>
|
||||
</div>
|
||||
|
||||
<div id="prvmail-expire-wrapper" style="display: {{$feature_expire}};" >
|
||||
<i id="prvmail-expires" class="icon-eraser jot-icons" title="{{$expires}}" onclick="prvmailGetExpiry();return false;"></i>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="prvmail-rotator-wrapper" >
|
||||
<img id="prvmail-rotator" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait}}" style="display: none;" />
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user