diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/components/cards/attachments.js | 2 | ||||
-rw-r--r-- | client/components/main/layouts.jade | 17 | ||||
-rw-r--r-- | client/components/users/userForm.styl | 120 | ||||
-rw-r--r-- | client/config/blazeHelpers.js | 2 | ||||
-rw-r--r-- | client/config/router.js | 125 |
5 files changed, 73 insertions, 193 deletions
diff --git a/client/components/cards/attachments.js b/client/components/cards/attachments.js index 1e5aa03b..4e3e0b19 100644 --- a/client/components/cards/attachments.js +++ b/client/components/cards/attachments.js @@ -22,7 +22,7 @@ Template.attachmentsGalery.events({ }, 'click .js-preview-image'(evt) { Popup.open('previewAttachedImage').call(this, evt); - // when multiple thumbnails, if click one then another very fast, + // when multiple thumbnails, if click one then another very fast, // we might get a wrong width from previous img. // when popup reused, onRendered() won't be called, so we cannot get there. // here make sure to get correct size when this img fully loaded. diff --git a/client/components/main/layouts.jade b/client/components/main/layouts.jade index 2095e016..943ebe0f 100644 --- a/client/components/main/layouts.jade +++ b/client/components/main/layouts.jade @@ -12,14 +12,15 @@ template(name="userFormsLayout") section.auth-layout h1.at-form-landing-logo img(src="{{pathFor '/wekan-logo.png'}}" alt="Wekan") - +Template.dynamic(template=content) - div.at-form-lang - select.select-lang.js-userform-set-language - each languages - if isCurrentLanguage - option(value="{{tag}}" selected="selected") {{name}} - else - option(value="{{tag}}") {{name}} + section.auth-dialog + +Template.dynamic(template=content) + div.at-form-lang + select.select-lang.js-userform-set-language + each languages + if isCurrentLanguage + option(value="{{tag}}" selected="selected") {{name}} + else + option(value="{{tag}}") {{name}} template(name="defaultLayout") +header diff --git a/client/components/users/userForm.styl b/client/components/users/userForm.styl index 48a6a74e..930efb5a 100644 --- a/client/components/users/userForm.styl +++ b/client/components/users/userForm.styl @@ -3,58 +3,61 @@ width: 249px margin: auto margin-top: 50px - margin-top: 17vh + margin-bottom: 20px - .at-form - margin: auto + .auth-dialog width: 275px padding: 25px - margin-top: 20px - padding-bottom: 10px + margin: auto + margin-bottom: 20px background: #fff border-radius: 3px border: 1px solid #dbdbdb border-bottom-color: #c2c2c2 box-shadow: 0 1px 6px rgba(0, 0, 0, .3) - .at-link - color: darken(#27AE60, 40%) - - label - margin-bottom: 3px - - input - width: 100% - - .at-title - background: #F7F7F7 - margin: -25px - padding: 15px 25px 5px - margin-bottom: 20px - border-bottom: 1px solid #dcdcdc - color: darken(white, 70%) - font-weight: bold - - .at-signup-link, - .at-signin-link, - .at-forgotPwd - font-size: 0.9em - margin-top: 15px - color: darken(white, 70%) - - .at-signUp, - .at-signIn + .at-form + + .at-link + color: darken(#27AE60, 40%) + + label + margin-bottom: 3px + + input + width: 100% + + button + width: 100% + background: #216694 + color: #fff + + .at-title + background: #F7F7F7 + margin: -25px + padding: 15px 25px 5px + margin-bottom: 20px + border-bottom: 1px solid #dcdcdc + color: darken(white, 70%) font-weight: bold - .at-form-lang - margin: auto - width: 275px - padding: 25px - padding-bottom: 10px + .at-signup-link, + .at-signin-link, + .at-forgotPwd + font-size: 0.9em + margin-top: 15px + color: darken(white, 70%) - .select-lang - width: 275px - font-size: 1.0em + .at-signUp, + .at-signIn + font-weight: bold + + .at-form-lang + margin-top: 0px + + .select-lang + width: 100% + margin-top: 10px @media screen and (max-width: 800px) .auth-layout @@ -64,26 +67,27 @@ padding: 0px .at-form-landing-logo - margin-top: 20px - margin-bottom: 20px + width: 125px + position: absolute + top: 0px + right: 20px + margin-top: 5px + margin-bottom: 5px - .at-form + img + width: 125px + + .auth-dialog width: calc(100% - 50px) - height: calc(100% - 162px) - margin: 0px + height: calc(100% - 50px) padding: 25px - - button - width: 100% - - .at-form-lang - width: 100% + min-height: 380px margin: 0px - padding: 0px + margin-bottom: 0px + border: 0px - .select-lang - width: 200px - font-size: 1.2em - position: absolute - left: calc((100% - 200px)/2) - bottom: 25px + .at-form + .at-title + h3 + width: calc(100% - 125px) + overflow-x: hidden diff --git a/client/config/blazeHelpers.js b/client/config/blazeHelpers.js index adf5ef6a..f3a1757f 100644 --- a/client/config/blazeHelpers.js +++ b/client/config/blazeHelpers.js @@ -14,6 +14,6 @@ Blaze.registerHelper('currentCard', () => { Blaze.registerHelper('getUser', (userId) => Users.findOne(userId)); -UI.registerHelper('concat', function (...args) { +Blaze.registerHelper('concat', function (...args) { return Array.prototype.slice.call(args, 0, -1).join(''); }); diff --git a/client/config/router.js b/client/config/router.js deleted file mode 100644 index ddd69db4..00000000 --- a/client/config/router.js +++ /dev/null @@ -1,125 +0,0 @@ -let previousPath; -FlowRouter.triggers.exit([({path}) => { - previousPath = path; -}]); - -FlowRouter.route('/', { - name: 'home', - triggersEnter: [AccountsTemplates.ensureSignedIn], - action() { - Session.set('currentBoard', null); - Session.set('currentCard', null); - - Filter.reset(); - EscapeActions.executeAll(); - - BlazeLayout.render('defaultLayout', { - headerBar: 'boardListHeaderBar', - content: 'boardList', - }); - }, -}); - -FlowRouter.route('/b/:id/:slug', { - name: 'board', - action(params) { - const currentBoard = params.id; - const previousBoard = Session.get('currentBoard'); - Session.set('currentBoard', currentBoard); - Session.set('currentCard', null); - - // If we close a card, we'll execute again this route action but we don't - // want to excape every current actions (filters, etc.) - if (previousBoard !== currentBoard) { - EscapeActions.executeAll(); - } else { - EscapeActions.executeUpTo('popup-close'); - } - - BlazeLayout.render('defaultLayout', { - headerBar: 'boardHeaderBar', - content: 'board', - }); - }, -}); - -FlowRouter.route('/b/:boardId/:slug/:cardId', { - name: 'card', - action(params) { - EscapeActions.executeUpTo('inlinedForm'); - - Session.set('currentBoard', params.boardId); - Session.set('currentCard', params.cardId); - - BlazeLayout.render('defaultLayout', { - headerBar: 'boardHeaderBar', - content: 'board', - }); - }, -}); - -FlowRouter.route('/shortcuts', { - name: 'shortcuts', - action() { - const shortcutsTemplate = 'keyboardShortcuts'; - - EscapeActions.executeUpTo('popup-close'); - - if (previousPath) { - Modal.open(shortcutsTemplate, { - header: 'shortcutsModalTitle', - onCloseGoTo: previousPath, - }); - } else { - BlazeLayout.render('defaultLayout', { - headerBar: 'shortcutsHeaderBar', - content: shortcutsTemplate, - }); - } - }, -}); - -FlowRouter.notFound = { - action() { - BlazeLayout.render('defaultLayout', { content: 'notFound' }); - }, -}; - -// We maintain a list of redirections to ensure that we don't break old URLs -// when we change our routing scheme. -const redirections = { - '/boards': '/', - '/boards/:id/:slug': '/b/:id/:slug', - '/boards/:id/:slug/:cardId': '/b/:id/:slug/:cardId', -}; - -_.each(redirections, (newPath, oldPath) => { - FlowRouter.route(oldPath, { - triggersEnter: [(context, redirect) => { - redirect(FlowRouter.path(newPath, context.params)); - }], - }); -}); - -// As it is not possible to use template helpers in the page <head> we create a -// reactive function whose role is to set any page-specific tag in the <head> -// using the `kadira:dochead` package. Currently we only use it to display the -// board title if we are in a board page (see #364) but we may want to support -// some <meta> tags in the future. -const appTitle = 'Wekan'; - -// XXX The `Meteor.startup` should not be necessary -- we don't need to wait for -// the complete DOM to be ready to call `DocHead.setTitle`. But the problem is -// that the global variable `Boards` is undefined when this file loads so we -// wait a bit until hopefully all files are loaded. This will be fixed in a -// clean way once Meteor will support ES6 modules -- hopefully in Meteor 1.3. -Meteor.startup(() => { - Tracker.autorun(() => { - const currentBoard = Boards.findOne(Session.get('currentBoard')); - const titleStack = [appTitle]; - if (currentBoard) { - titleStack.push(currentBoard.title); - } - DocHead.setTitle(titleStack.reverse().join(' - ')); - }); -}); |