mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Style tweaks
Follows strictly jshint and jscs rules.
This commit is contained in:
parent
fbc4c5e82e
commit
22b8b6ab20
8 changed files with 23 additions and 19 deletions
1
.jscsrc
1
.jscsrc
|
|
@ -68,6 +68,7 @@
|
||||||
],
|
],
|
||||||
"safeContextKeyword": [
|
"safeContextKeyword": [
|
||||||
"self",
|
"self",
|
||||||
|
"context",
|
||||||
"view"
|
"view"
|
||||||
],
|
],
|
||||||
"validateLineBreaks": "LF",
|
"validateLineBreaks": "LF",
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ meteor-platform
|
||||||
accounts-password
|
accounts-password
|
||||||
kenton:accounts-sandstorm
|
kenton:accounts-sandstorm
|
||||||
service-configuration
|
service-configuration
|
||||||
|
useraccounts:core
|
||||||
useraccounts:unstyled
|
useraccounts:unstyled
|
||||||
|
|
||||||
# Compilers
|
# Compilers
|
||||||
|
|
@ -50,4 +51,3 @@ mquandalle:jquery-textcomplete
|
||||||
peerlibrary:blaze-components
|
peerlibrary:blaze-components
|
||||||
reactive-var
|
reactive-var
|
||||||
seriousm:emoji-continued
|
seriousm:emoji-continued
|
||||||
useraccounts:core
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,6 @@ made with [Meteor](https://www.meteor.com).
|
||||||
[Our roadmap is self-hosted on LibreBoard][roadmap]
|
[Our roadmap is self-hosted on LibreBoard][roadmap]
|
||||||
|
|
||||||
[travis-status]: https://travis-ci.org/libreboard/libreboard.svg
|
[travis-status]: https://travis-ci.org/libreboard/libreboard.svg
|
||||||
[travis-link]: https://travis-ci.org/libreboard/libreboard.svg
|
[travis-link]: https://travis-ci.org/libreboard/libreboard
|
||||||
[thumbnail]: http://i.imgur.com/IIdHUmW.png
|
[thumbnail]: http://i.imgur.com/IIdHUmW.png
|
||||||
[roadmap]: http://libreboard.com/boards/MeSsFJaSqeuo9M6bs/libreboard-roadmap
|
[roadmap]: http://libreboard.com/boards/MeSsFJaSqeuo9M6bs/libreboard-roadmap
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ BlazeComponent.extendComponent({
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
},
|
},
|
||||||
'click .js-cancel-edit': function(event, t) {
|
'click .js-cancel-edit': function() {
|
||||||
// remove editing hide.
|
// remove editing hide.
|
||||||
$('.editing').removeClass('editing');
|
$('.editing').removeClass('editing');
|
||||||
},
|
},
|
||||||
|
|
@ -64,8 +64,8 @@ BlazeComponent.extendComponent({
|
||||||
$set: {
|
$set: {
|
||||||
title: title
|
title: title
|
||||||
}
|
}
|
||||||
}, function (err, res) {
|
}, function(err) {
|
||||||
if (!err) $('.editing').removeClass('editing');
|
if (! err) $('.editing').removeClass('editing');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -77,7 +77,7 @@ BlazeComponent.extendComponent({
|
||||||
description: t.find('#desc').value
|
description: t.find('#desc').value
|
||||||
}
|
}
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
if (!err) $('.editing').removeClass('editing');
|
if (! err) $('.editing').removeClass('editing');
|
||||||
});
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,8 @@ BlazeComponent.extendComponent({
|
||||||
var list = $('#js-list-' + this.data()._id);
|
var list = $('#js-list-' + this.data()._id);
|
||||||
var nextList = list[isReverse ? 'prev' : 'next']('.js-list').get(0) ||
|
var nextList = list[isReverse ? 'prev' : 'next']('.js-list').get(0) ||
|
||||||
$('.js-list:' + (isReverse ? 'last' : 'first')).get(0);
|
$('.js-list:' + (isReverse ? 'last' : 'first')).get(0);
|
||||||
var nextListComponent = BlazeComponent.getComponentForElement(nextList);
|
var nextListComponent =
|
||||||
|
BlazeComponent.getComponentForElement(nextList);
|
||||||
|
|
||||||
// XXX Get the real position
|
// XXX Get the real position
|
||||||
var position = 'bottom';
|
var position = 'bottom';
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
ListComponent = BlazeComponent.extendComponent({
|
BlazeComponent.extendComponent({
|
||||||
template: function() {
|
template: function() {
|
||||||
return 'list';
|
return 'list';
|
||||||
},
|
},
|
||||||
|
|
@ -27,19 +27,19 @@ ListComponent = BlazeComponent.extendComponent({
|
||||||
if (Meteor.user().isBoardMember()) {
|
if (Meteor.user().isBoardMember()) {
|
||||||
var $cards = this.$('.js-minicards');
|
var $cards = this.$('.js-minicards');
|
||||||
$cards.sortable({
|
$cards.sortable({
|
||||||
connectWith: ".js-minicards",
|
connectWith: '.js-minicards',
|
||||||
tolerance: 'pointer',
|
tolerance: 'pointer',
|
||||||
appendTo: '.js-lists',
|
appendTo: '.js-lists',
|
||||||
helper: "clone",
|
helper: 'clone',
|
||||||
items: '.js-minicard:not(.placeholder, .hide, .js-composer)',
|
items: '.js-minicard:not(.placeholder, .hide, .js-composer)',
|
||||||
placeholder: 'minicard placeholder',
|
placeholder: 'minicard placeholder',
|
||||||
start: function (event, ui) {
|
start: function(event, ui) {
|
||||||
$('.minicard.placeholder').height(ui.item.height());
|
$('.minicard.placeholder').height(ui.item.height());
|
||||||
Popup.close();
|
Popup.close();
|
||||||
},
|
},
|
||||||
stop: function(event, ui) {
|
stop: function(event, ui) {
|
||||||
// To attribute the new index number, we need to get the dom element of
|
// To attribute the new index number, we need to get the dom element
|
||||||
// the previous and the following card -- if any.
|
// of the previous and the following card -- if any.
|
||||||
var cardDomElement = ui.item.get(0);
|
var cardDomElement = ui.item.get(0);
|
||||||
var prevCardDomElement = ui.item.prev('.js-minicard').get(0);
|
var prevCardDomElement = ui.item.prev('.js-minicard').get(0);
|
||||||
var nextCardDomElement = ui.item.next('.js-minicard').get(0);
|
var nextCardDomElement = ui.item.next('.js-minicard').get(0);
|
||||||
|
|
@ -57,7 +57,7 @@ ListComponent = BlazeComponent.extendComponent({
|
||||||
|
|
||||||
Utils.liveEvent('mouseover', function($el) {
|
Utils.liveEvent('mouseover', function($el) {
|
||||||
$el.find('.js-member-droppable').droppable({
|
$el.find('.js-member-droppable').droppable({
|
||||||
hoverClass: "draggable-hover-card",
|
hoverClass: 'draggable-hover-card',
|
||||||
accept: '.js-member',
|
accept: '.js-member',
|
||||||
drop: function(event, ui) {
|
drop: function(event, ui) {
|
||||||
var memberId = Blaze.getData(ui.draggable.get(0)).userId;
|
var memberId = Blaze.getData(ui.draggable.get(0)).userId;
|
||||||
|
|
@ -67,7 +67,7 @@ ListComponent = BlazeComponent.extendComponent({
|
||||||
});
|
});
|
||||||
|
|
||||||
$el.find('.js-member-droppable').droppable({
|
$el.find('.js-member-droppable').droppable({
|
||||||
hoverClass: "draggable-hover-card",
|
hoverClass: 'draggable-hover-card',
|
||||||
accept: '.js-label',
|
accept: '.js-label',
|
||||||
drop: function(event, ui) {
|
drop: function(event, ui) {
|
||||||
var labelId = Blaze.getData(ui.draggable.get(0))._id;
|
var labelId = Blaze.getData(ui.draggable.get(0))._id;
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ Template.listActionPopup.events({
|
||||||
// XXX We need a better API and architecture here. See
|
// XXX We need a better API and architecture here. See
|
||||||
// https://github.com/peerlibrary/meteor-blaze-components/issues/19
|
// https://github.com/peerlibrary/meteor-blaze-components/issues/19
|
||||||
var listDom = document.getElementById('js-list-' + this._id);
|
var listDom = document.getElementById('js-list-' + this._id);
|
||||||
var listComponent = Blaze.getView(listDom).templateInstance().get('component');
|
var listInstance = Blaze.getView(listDom).templateInstance();
|
||||||
listComponent.openForm();
|
listInstance.get('component').openForm();
|
||||||
Popup.close();
|
Popup.close();
|
||||||
},
|
},
|
||||||
'click .js-list-subscribe': function() {},
|
'click .js-list-subscribe': function() {},
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ Blaze.Template.registerHelper('mentions', new Template('mentions', function() {
|
||||||
|
|
||||||
var mentionRegex = /\B@(\w*)/gi;
|
var mentionRegex = /\B@(\w*)/gi;
|
||||||
var currentMention, knowedUser, href, linkClass, linkValue, link;
|
var currentMention, knowedUser, href, linkClass, linkValue, link;
|
||||||
while (currentMention = mentionRegex.exec(content)) {
|
while (!! (currentMention = mentionRegex.exec(content))) {
|
||||||
|
|
||||||
knowedUser = _.findWhere(knowedUsers, { username: currentMention[1] });
|
knowedUser = _.findWhere(knowedUsers, { username: currentMention[1] });
|
||||||
if (! knowedUser)
|
if (! knowedUser)
|
||||||
|
|
@ -53,7 +53,9 @@ Blaze.Template.registerHelper('mentions', new Template('mentions', function() {
|
||||||
|
|
||||||
linkValue = [' ', at, knowedUser.username];
|
linkValue = [' ', at, knowedUser.username];
|
||||||
href = Router.url('Profile', { username: knowedUser.username });
|
href = Router.url('Profile', { username: knowedUser.username });
|
||||||
linkClass = 'atMention' + (knowedUser.userId === Meteor.userId() ? ' me' : '');
|
linkClass = 'atMention';
|
||||||
|
if (knowedUser.userId === Meteor.userId())
|
||||||
|
linkClass += ' me';
|
||||||
link = HTML.A({ href: href, 'class': linkClass }, linkValue);
|
link = HTML.A({ href: href, 'class': linkClass }, linkValue);
|
||||||
|
|
||||||
content = content.replace(currentMention[0], Blaze.toHTML(link));
|
content = content.replace(currentMention[0], Blaze.toHTML(link));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue