Skip to content

Commit

Permalink
Colored buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Demeshchuk committed Jan 31, 2014
1 parent f7aae25 commit e0bae28
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 31 deletions.
4 changes: 3 additions & 1 deletion wrike.com/approve.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
toolbarSelector: '.wspace-task-settings-bar'
taistToolbarId: 'wrike-taist-toolbar'
buttonTemplate: '<a class="wspace-task-settings-button"></a>'
buttonHighlightClass: 'x-btn-over'
buttonHighlightClass: 'taist-wrike-x-btn-over'
}
}

Expand Down Expand Up @@ -136,9 +136,11 @@

for buttonTitle, nextState of states[@state].triggers
do(buttonTitle, nextState) =>
idSuffix = buttonTitle.toLowerCase().replace(/\s/g, '-')
button = $(cfg.buttonTemplate)
button.text buttonTitle
button.hover mOver, mOut
button.attr 'id', 'taist-wrike-approval-' + idSuffix
button.on 'click', =>
@toolbar.empty()
@applyState nextState
Expand Down
18 changes: 18 additions & 0 deletions wrike.com/approve.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#taist-wrike-approval-send-for-approval {
background-color: #8686E8;
text-shadow: none;
}

#taist-wrike-approval-approve {
background-color: #86E886;
text-shadow: none;
}

#taist-wrike-approval-decline {
background-color: #E88686;
text-shadow: none;
}

.taist-wrike-x-btn-over {
opacity: 0.5
}
60 changes: 30 additions & 30 deletions wrike.com/approve.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e0bae28

Please sign in to comment.