mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
Added popup
This commit is contained in:
parent
a2d756074f
commit
196fef3a1b
6 changed files with 22 additions and 5 deletions
|
|
@ -123,6 +123,15 @@
|
||||||
.trigger-text
|
.trigger-text
|
||||||
font-size: 16px
|
font-size: 16px
|
||||||
display:inline-block
|
display:inline-block
|
||||||
|
.trigger-inline-button
|
||||||
|
font-size: 16px
|
||||||
|
display: inline;
|
||||||
|
padding: 6px;
|
||||||
|
border: 1px solid #eee
|
||||||
|
border-radius: 4px
|
||||||
|
box-shadow: inset -1px -1px 3px rgba(0,0,0,.05)
|
||||||
|
&:hover, &.is-active
|
||||||
|
box-shadow: 0 0 0 2px darken(white, 60%) inset
|
||||||
.trigger-text.trigger-text-email
|
.trigger-text.trigger-text-email
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,10 @@ template(name="rulesMain")
|
||||||
if($eq rulesCurrentTab.get 'action')
|
if($eq rulesCurrentTab.get 'action')
|
||||||
+rulesActions(ruleName=ruleName triggerVar=triggerVar)
|
+rulesActions(ruleName=ruleName triggerVar=triggerVar)
|
||||||
if($eq rulesCurrentTab.get 'ruleDetails')
|
if($eq rulesCurrentTab.get 'ruleDetails')
|
||||||
+ruleDetails(ruleId=ruleId)
|
+ruleDetails(ruleId=ruleId)
|
||||||
|
|
||||||
|
template(name="boardCardTitlePopup")
|
||||||
|
form
|
||||||
|
label
|
||||||
|
| Card Title Filter
|
||||||
|
input.js-board-name(type="text" value=title autofocus)
|
||||||
|
|
@ -31,6 +31,7 @@ BlazeComponent.extendComponent({
|
||||||
Triggers.remove(rule.triggerId);
|
Triggers.remove(rule.triggerId);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
'click .js-open-card-title-popup': Popup.open('boardCardTitle'),
|
||||||
'click .js-goto-trigger' (event) {
|
'click .js-goto-trigger' (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const ruleTitle = this.find('#ruleTitle').value;
|
const ruleTitle = this.find('#ruleTitle').value;
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ template(name="boardTriggers")
|
||||||
div.trigger-content
|
div.trigger-content
|
||||||
div.trigger-text
|
div.trigger-text
|
||||||
| {{_'r-when-a-card-is'}}
|
| {{_'r-when-a-card-is'}}
|
||||||
|
div.trigger-inline-button.js-open-card-title-popup
|
||||||
|
i.fa.fa-filter
|
||||||
div.trigger-text
|
div.trigger-text
|
||||||
| {{_'r-added-to'}}
|
| {{_'r-added-to'}}
|
||||||
div.trigger-text
|
div.trigger-text
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,9 @@ window.Popup = new class {
|
||||||
open(name) {
|
open(name) {
|
||||||
const self = this;
|
const self = this;
|
||||||
const popupName = `${name}Popup`;
|
const popupName = `${name}Popup`;
|
||||||
|
|
||||||
function clickFromPopup(evt) {
|
function clickFromPopup(evt) {
|
||||||
return $(evt.target).closest('.js-pop-over').length !== 0;
|
return $(evt.target).closest('.js-pop-over').length !== 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return function(evt) {
|
return function(evt) {
|
||||||
// If a popup is already opened, clicking again on the opener element
|
// If a popup is already opened, clicking again on the opener element
|
||||||
// should close it -- and interrupt the current `open` function.
|
// should close it -- and interrupt the current `open` function.
|
||||||
|
|
@ -57,7 +55,6 @@ window.Popup = new class {
|
||||||
self._stack = [];
|
self._stack = [];
|
||||||
openerElement = evt.currentTarget;
|
openerElement = evt.currentTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
$(openerElement).addClass('is-active');
|
$(openerElement).addClass('is-active');
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
|
||||||
|
|
@ -139,6 +136,7 @@ window.Popup = new class {
|
||||||
const openerElement = this._getTopStack().openerElement;
|
const openerElement = this._getTopStack().openerElement;
|
||||||
$(openerElement).removeClass('is-active');
|
$(openerElement).removeClass('is-active');
|
||||||
|
|
||||||
|
|
||||||
this._stack = [];
|
this._stack = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -200,7 +198,7 @@ escapeActions.forEach((actionName) => {
|
||||||
() => Popup[actionName](),
|
() => Popup[actionName](),
|
||||||
() => Popup.isOpen(),
|
() => Popup.isOpen(),
|
||||||
{
|
{
|
||||||
noClickEscapeOn: '.js-pop-over',
|
noClickEscapeOn: '.js-pop-over,.js-open-card-title-popup',
|
||||||
enabledOnClick: actionName === 'close',
|
enabledOnClick: actionName === 'close',
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -467,6 +467,7 @@
|
||||||
"error-notAuthorized": "You are not authorized to view this page.",
|
"error-notAuthorized": "You are not authorized to view this page.",
|
||||||
"outgoing-webhooks": "Outgoing Webhooks",
|
"outgoing-webhooks": "Outgoing Webhooks",
|
||||||
"outgoingWebhooksPopup-title": "Outgoing Webhooks",
|
"outgoingWebhooksPopup-title": "Outgoing Webhooks",
|
||||||
|
"boardCardTitlePopup-title": "Card Title Filter",
|
||||||
"new-outgoing-webhook": "New Outgoing Webhook",
|
"new-outgoing-webhook": "New Outgoing Webhook",
|
||||||
"no-name": "(Unknown)",
|
"no-name": "(Unknown)",
|
||||||
"Node_version": "Node version",
|
"Node_version": "Node version",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue