mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Drag&Drop recipients emails on compose screen.
This commit is contained in:
parent
4938f0fbfe
commit
0ec965bccb
11 changed files with 80 additions and 21 deletions
|
|
@ -17,6 +17,11 @@
|
||||||
padding: 2px 15px 2px 5px;
|
padding: 2px 15px 2px 5px;
|
||||||
margin: 2px 2px 2px;
|
margin: 2px 2px 2px;
|
||||||
color: #555;
|
color: #555;
|
||||||
|
z-index: 100;
|
||||||
|
|
||||||
|
&.ui-draggable.ui-draggable-dragging {
|
||||||
|
z-index: 101;
|
||||||
|
}
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,7 @@ class Service
|
||||||
{
|
{
|
||||||
$sJsBoot = \file_get_contents(APP_VERSION_ROOT_PATH.'static/js/boot.js');
|
$sJsBoot = \file_get_contents(APP_VERSION_ROOT_PATH.'static/js/boot.js');
|
||||||
$sResult = \strtr(\file_get_contents(APP_VERSION_ROOT_PATH.'app/templates/Index.html'), array(
|
$sResult = \strtr(\file_get_contents(APP_VERSION_ROOT_PATH.'app/templates/Index.html'), array(
|
||||||
|
'{{BaseRandHash}}' => \md5(\rand(1000, 9000).\microtime(true)),
|
||||||
'{{BaseAppDataScriptLink}}' => ($bAdmin ? APP_INDEX_FILE.'?/AdminAppData/' : APP_INDEX_FILE.'?/AppData/'),
|
'{{BaseAppDataScriptLink}}' => ($bAdmin ? APP_INDEX_FILE.'?/AdminAppData/' : APP_INDEX_FILE.'?/AppData/'),
|
||||||
'{{BaseAppIndexFile}}' => APP_INDEX_FILE,
|
'{{BaseAppIndexFile}}' => APP_INDEX_FILE,
|
||||||
'{{BaseAppFaviconIcoFile}}' => $aData['FaviconIcoLink'],
|
'{{BaseAppFaviconIcoFile}}' => $aData['FaviconIcoLink'],
|
||||||
|
|
|
||||||
|
|
@ -884,7 +884,7 @@ class ServiceActions
|
||||||
@\header('Content-Type: application/javascript; charset=utf-8');
|
@\header('Content-Type: application/javascript; charset=utf-8');
|
||||||
@\header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
@\header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||||
@\header('Last-Modified: '.\gmdate('D, d M Y H:i:s').' GMT');
|
@\header('Last-Modified: '.\gmdate('D, d M Y H:i:s').' GMT');
|
||||||
@\header('Cache-Control: no-store, no-cache, must-revalidate');
|
@\header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
|
||||||
@\header('Cache-Control: post-check=0, pre-check=0', false);
|
@\header('Cache-Control: post-check=0, pre-check=0', false);
|
||||||
@\header('Pragma: no-cache');
|
@\header('Pragma: no-cache');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
<link type="text/css" rel="stylesheet" id="rlThemeLink" />
|
<link type="text/css" rel="stylesheet" id="rlThemeLink" />
|
||||||
<script type="text/javascript">{{BaseAppBootScriptSource}}</script>
|
<script type="text/javascript">{{BaseAppBootScriptSource}}</script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
__fIncludeScr('{{BaseAppDataScriptLink}}' + (window.__rlah ? window.__rlah() || '0' : '0') + '/');
|
__fIncludeScr('{{BaseAppDataScriptLink}}' + (window.__rlah ? window.__rlah() || '0' : '0') + '/{{BaseRandHash}}/');
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
if (window.rainloopAppData && window.rainloopAppData['NewThemeLink']) {
|
if (window.rainloopAppData && window.rainloopAppData['NewThemeLink']) {
|
||||||
|
|
|
||||||
|
|
@ -5626,8 +5626,12 @@ html.no-rgba .modal {
|
||||||
padding: 2px 15px 2px 5px;
|
padding: 2px 15px 2px 5px;
|
||||||
margin: 2px 2px 2px;
|
margin: 2px 2px 2px;
|
||||||
color: #555;
|
color: #555;
|
||||||
|
z-index: 100;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
.inputosaurus-container li.ui-draggable.ui-draggable-dragging {
|
||||||
|
z-index: 101;
|
||||||
|
}
|
||||||
.inputosaurus-container li a {
|
.inputosaurus-container li a {
|
||||||
color: #999;
|
color: #999;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|
|
||||||
2
rainloop/v/0.0.0/static/css/app.min.css
vendored
2
rainloop/v/0.0.0/static/css/app.min.css
vendored
File diff suppressed because one or more lines are too long
6
rainloop/v/0.0.0/static/js/admin.min.js
vendored
6
rainloop/v/0.0.0/static/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
61
vendors/inputosaurus/inputosaurus.js
vendored
61
vendors/inputosaurus/inputosaurus.js
vendored
|
|
@ -74,6 +74,21 @@
|
||||||
|
|
||||||
// Create the elements
|
// Create the elements
|
||||||
els.ul = $('<ul class="inputosaurus-container"></ul>');
|
els.ul = $('<ul class="inputosaurus-container"></ul>');
|
||||||
|
els.ul.droppable({
|
||||||
|
'drop': function(event, ui) {
|
||||||
|
|
||||||
|
ui.draggable.addClass('inputosaurus-dropped');
|
||||||
|
els.input.val(ui.draggable.data('inputosaurus-value'));
|
||||||
|
|
||||||
|
if (ui.draggable.__widget)
|
||||||
|
{
|
||||||
|
ui.draggable.__widget._removeDraggedTag(ui.draggable);
|
||||||
|
}
|
||||||
|
|
||||||
|
widget.parseInput();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
els.input = $('<input type="email" />');
|
els.input = $('<input type="email" />');
|
||||||
els.inputCont = $('<li class="inputosaurus-input inputosaurus-required"></li>');
|
els.inputCont = $('<li class="inputosaurus-input inputosaurus-required"></li>');
|
||||||
els.origInputCont = $('<li class="inputosaurus-input-hidden inputosaurus-required"></li>');
|
els.origInputCont = $('<li class="inputosaurus-input-hidden inputosaurus-required"></li>');
|
||||||
|
|
@ -109,10 +124,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this._instAutocomplete();
|
this._instAutocomplete();
|
||||||
|
|
||||||
// els.ul.sortable({
|
|
||||||
// 'connectWith': '.inputosaurus-container.ui-sortable'
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_instAutocomplete : function() {
|
_instAutocomplete : function() {
|
||||||
|
|
@ -475,8 +486,23 @@
|
||||||
// @className optional className for <li>
|
// @className optional className for <li>
|
||||||
_createTag : function(name, key, obj) {
|
_createTag : function(name, key, obj) {
|
||||||
if (name !== undefined && obj) {
|
if (name !== undefined && obj) {
|
||||||
return $('<li data-inputosaurus="' + key + '" title="' + obj.toLine(false, false, true) +
|
var
|
||||||
'"><a href="javascript:void(0);" class="ficon">✖</a><span>' + obj.toLine(true, false, true) + '</span></li>');
|
widget = this,
|
||||||
|
$li = $('<li data-inputosaurus="' + key + '" title="' + obj.toLine(false, false, true) +
|
||||||
|
'"><a href="javascript:void(0);" class="ficon">✖</a><span>' +
|
||||||
|
obj.toLine(true, false, true) + '</span></li>')
|
||||||
|
;
|
||||||
|
|
||||||
|
$li.data('inputosaurus-value', obj.toLine(false, false, false));
|
||||||
|
$li.draggable({
|
||||||
|
'revert': 'invalid',
|
||||||
|
'revertDuration': 200,
|
||||||
|
'start': function(event, ui) {
|
||||||
|
ui.helper.__widget = widget;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return $li;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -513,6 +539,29 @@
|
||||||
}, 100);
|
}, 100);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_removeDraggedTag : function ($li) {
|
||||||
|
var
|
||||||
|
key = $li.data('inputosaurus'),
|
||||||
|
widget = this,
|
||||||
|
indexFound = false
|
||||||
|
;
|
||||||
|
|
||||||
|
$.each(widget._chosenValues, function(k,v) {
|
||||||
|
if (key === v.key) {
|
||||||
|
|
||||||
|
indexFound = k;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (false !== indexFound)
|
||||||
|
{
|
||||||
|
widget._chosenValues.splice(indexFound, 1);
|
||||||
|
widget._setValue(widget._buildValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
$li.remove();
|
||||||
|
},
|
||||||
|
|
||||||
focus : function () {
|
focus : function () {
|
||||||
this.elements.input.focus();
|
this.elements.input.focus();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
2
vendors/inputosaurus/inputosaurus.min.js
vendored
2
vendors/inputosaurus/inputosaurus.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue