Merge pull request #2702 from myabc/feature/19203-enable-3rd-party-component-styling

19203 Configure stylesheet loading to enable third-party component styling
pull/2739/head
Florian Kraft 10 years ago
commit dad0728d6f
  1. BIN
      app/assets/images/jquery-ui/ui-icons_222222_256x240.png
  2. BIN
      app/assets/images/jquery-ui/ui-icons_2e83ff_256x240.png
  3. BIN
      app/assets/images/jquery-ui/ui-icons_454545_256x240.png
  4. BIN
      app/assets/images/jquery-ui/ui-icons_888888_256x240.png
  5. BIN
      app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png
  6. BIN
      app/assets/images/select2/select2-spinner.gif
  7. 42
      app/assets/javascripts/application.js.erb
  8. 2
      app/assets/stylesheets/content/_accounts.sass
  9. 6
      app/assets/stylesheets/content/_calendar.sass
  10. 4
      app/assets/stylesheets/content/_forms.sass
  11. 18
      app/assets/stylesheets/content/_jquery_ui.md
  12. 431
      app/assets/stylesheets/content/_jquery_ui.scss
  13. 5
      app/assets/stylesheets/content/_modal.sass
  14. 82
      app/assets/stylesheets/content/_select2.md
  15. 72
      app/assets/stylesheets/content/_select2.scss
  16. 26
      app/assets/stylesheets/content/_wiki.sass
  17. 2
      app/assets/stylesheets/content/work_package_details/_relations_tab.sass
  18. 2
      app/assets/stylesheets/content/work_package_details/_watchers_tab.sass
  19. 8
      app/assets/stylesheets/default.css.sass
  20. 2
      app/assets/stylesheets/layout/_breadcrumb.sass
  21. 2
      app/assets/stylesheets/layout/_top_menu.sass
  22. 2
      app/assets/stylesheets/open_project_global/_variables.sass
  23. 18
      app/assets/stylesheets/scm.css.sass
  24. 0
      app/assets/stylesheets/styleguide.css
  25. 3
      app/assets/stylesheets/styleguide.html.lsg
  26. 1
      app/assets/stylesheets/styleguide.js
  27. 4
      config/initializers/non_digest_assets.rb
  28. 6
      frontend/app/assets/styleguide.jade
  29. 14
      frontend/app/global.js
  30. 71
      frontend/app/misc/datepicker-defaults.js
  31. 6
      frontend/app/openproject-app.js
  32. 4
      frontend/gulpfile.js
  33. 122
      frontend/npm-shrinkwrap.json
  34. 3
      frontend/package.json
  35. 17
      frontend/webpack.config.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -67,48 +67,6 @@ jQuery(document).ready(function ($) {
}
});
if (typeof CS !== "undefined") {
var regions = $.datepicker.regional;
var regional = regions[CS.lang] || regions[""];
$.datepicker.setDefaults(regional);
var gotoToday = $.datepicker._gotoToday;
$.datepicker._gotoToday = function (id) {
gotoToday.call(this, id);
var target = $(id),
inst = this._getInst(target[0]),
dateStr = $.datepicker._formatDate(inst);
target.val(dateStr);
target.blur();
$.datepicker._hideDatepicker();
};
var defaults = {
showWeek: true,
changeMonth: true,
changeYear: true,
yearRange: "c-100:c+10",
dateFormat: 'yy-mm-dd',
showButtonPanel: true,
calculateWeek: function (day) {
var dayOfWeek = new Date(+day);
if (day.getDay() != 1) {
dayOfWeek.setDate(day.getDate() - day.getDay() + 1);
}
return $.datepicker.iso8601Week(dayOfWeek);
}
};
if (CS.firstWeekDay && CS.firstWeekDay !== "") {
defaults.firstDay = parseInt(CS.firstWeekDay, 10);
}
$.datepicker.setDefaults(defaults);
}
$(document).on('click', '#show_more_wp_properties', function(el){
$(this).find('.icon').toggleClass('icon-arrow-right6-3 icon-arrow-right6-1');
Effect.toggle("work_package_descr_fields", "appear", {duration:0.3});

@ -88,7 +88,7 @@
padding-left: 50px
margin-left: 10px
margin-top: 20px
background-image: url(image-path('auth_provider-developer.png'))
background-image: image-url('auth_provider-developer.png')
background-size: 40px 40px
background-repeat: no-repeat
font-weight: normal

@ -62,13 +62,13 @@ table.cal
&.today
background: $content-calendar-cell-today-bg-color
.starting a, p.cal.legend .starting
background: url(image-path('bullet_go.png')) no-repeat -1px -2px
background: image-url('bullet_go.png') no-repeat -1px -2px
padding-left: 16px
.ending a, p.cal.legend .ending
background: url(image-path('bullet_end.png')) no-repeat -1px -2px
background: image-url('bullet_end.png') no-repeat -1px -2px
padding-left: 16px
.starting.ending a, p.cal.legend .starting.ending
background: url(image-path('bullet_diamond.png')) no-repeat -1px -2px
background: image-url('bullet_diamond.png') no-repeat -1px -2px
padding-left: 16px
p.cal.legend span

@ -106,10 +106,6 @@ fieldset
padding-left: 5px
background-color: white
.ui-widget
font-family: $body-font-family
font-size: 0.9rem
// TODO: Customise with proper jQuery UI theme.
.ui-datepicker-month,
.ui-datepicker-year

@ -0,0 +1,18 @@
# jQuery UI Components
## Datepicker
```
<input type="text" id="datepicker-input">
<div id="datepicker-inline"></div>
```
```
@javascript
jQuery(function($) {
$("#datepicker-inline").datepicker();
$("#datepicker-input").datepicker();
});
```

@ -0,0 +1,431 @@
//-- copyright
// OpenProject is a project management system.
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF)
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License version 3.
//
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
// Copyright (C) 2006-2013 Jean-Philippe Lang
// Copyright (C) 2010-2013 the ChiliProject Team
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// See doc/COPYRIGHT.rdoc for more details.
//++
/*!
* jQuery UI CSS Framework 1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/theming/
*
* To view and modify this theme, visit http://jqueryui.com/themeroller/
*/
/* Component containers
----------------------------------*/
.ui-widget {
font-family: $body-font-family;
font-size: rem-calc(15px);
}
.ui-widget .ui-widget {
font-size: 1em;
}
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
font-family: $body-font-family;
font-size: 1em;
}
.ui-widget-content {
border: 1px solid #aaaaaa/*{borderColorContent}*/;
background: #ffffff/*{bgColorContent}*/;
color: #222222/*{fcContent}*/;
}
.ui-widget-content a {
color: #222222/*{fcContent}*/;
}
.ui-widget-header {
border: 1px solid #aaaaaa/*{borderColorHeader}*/;
background: #cccccc/*{bgColorHeader}*/;
color: #222222/*{fcHeader}*/;
font-weight: bold;
}
.ui-widget-header a {
color: #222222/*{fcHeader}*/;
}
/* Interaction states
----------------------------------*/
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
border: 1px solid #d3d3d3/*{borderColorDefault}*/;
background: #e6e6e6/*{bgColorDefault}*/;
font-weight: normal/*{fwDefault}*/;
color: #555555/*{fcDefault}*/;
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited {
color: #555555/*{fcDefault}*/;
text-decoration: none;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus {
border: 1px solid #999999/*{borderColorHover}*/;
background: #dadada/*{bgColorHover}*/;
font-weight: normal/*{fwDefault}*/;
color: #212121/*{fcHover}*/;
}
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
.ui-state-hover a:visited,
.ui-state-focus a,
.ui-state-focus a:hover,
.ui-state-focus a:link,
.ui-state-focus a:visited {
color: #212121/*{fcHover}*/;
text-decoration: none;
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {
border: 1px solid #aaaaaa/*{borderColorActive}*/;
background: #ffffff/*{bgColorActive}*/;
font-weight: normal/*{fwDefault}*/;
color: #212121/*{fcActive}*/;
}
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
color: #212121/*{fcActive}*/;
text-decoration: none;
}
/* Interaction Cues
----------------------------------*/
.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
border: 1px solid #fcefa1/*{borderColorHighlight}*/;
background: #fbf9ee/*{bgColorHighlight}*/;
color: #363636/*{fcHighlight}*/;
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a {
color: #363636/*{fcHighlight}*/;
}
.ui-state-error,
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
border: 1px solid #cd0a0a/*{borderColorError}*/;
background: #fef1ec/*{bgColorError}*/;
color: #cd0a0a/*{fcError}*/;
}
.ui-state-error a,
.ui-widget-content .ui-state-error a,
.ui-widget-header .ui-state-error a {
color: #cd0a0a/*{fcError}*/;
}
.ui-state-error-text,
.ui-widget-content .ui-state-error-text,
.ui-widget-header .ui-state-error-text {
color: #cd0a0a/*{fcError}*/;
}
.ui-priority-primary,
.ui-widget-content .ui-priority-primary,
.ui-widget-header .ui-priority-primary {
font-weight: bold;
}
.ui-priority-secondary,
.ui-widget-content .ui-priority-secondary,
.ui-widget-header .ui-priority-secondary {
opacity: .7;
font-weight: normal;
}
.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
opacity: .35;
background-image: none;
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
width: 16px;
height: 16px;
}
.ui-icon,
.ui-widget-content .ui-icon {
background-image: image-url('jquery-ui/ui-icons_222222_256x240.png')/*{iconsContent}*/;
}
.ui-widget-header .ui-icon {
background-image: image-url('jquery-ui/ui-icons_222222_256x240.png')/*{iconsHeader}*/;
}
.ui-state-default .ui-icon {
background-image: image-url('jquery-ui/ui-icons_888888_256x240.png')/*{iconsDefault}*/;
}
.ui-state-hover .ui-icon,
.ui-state-focus .ui-icon {
background-image: image-url('jquery-ui/ui-icons_454545_256x240.png')/*{iconsHover}*/;
}
.ui-state-active .ui-icon {
background-image: image-url('jquery-ui/ui-icons_454545_256x240.png')/*{iconsActive}*/;
}
.ui-state-highlight .ui-icon {
background-image: image-url('jquery-ui/ui-icons_2e83ff_256x240.png')/*{iconsHighlight}*/;
}
.ui-state-error .ui-icon,
.ui-state-error-text .ui-icon {
background-image: image-url('jquery-ui/ui-icons_cd0a0a_256x240.png')/*{iconsError}*/;
}
/* positioning */
.ui-icon-blank { background-position: 16px 16px; }
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-on { background-position: -96px -144px; }
.ui-icon-radio-off { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-all,
.ui-corner-top,
.ui-corner-left,
.ui-corner-tl {
border-top-left-radius: 4px/*{cornerRadius}*/;
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-right,
.ui-corner-tr {
border-top-right-radius: 4px/*{cornerRadius}*/;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-left,
.ui-corner-bl {
border-bottom-left-radius: 4px/*{cornerRadius}*/;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br {
border-bottom-right-radius: 4px/*{cornerRadius}*/;
}
/* Overlays */
.ui-widget-overlay {
background: #aaaaaa/*{bgColorOverlay}*/;
opacity: .3/*{opacityOverlay}*/;
}
.ui-widget-shadow {
margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/;
padding: 8px/*{thicknessShadow}*/;
background: #aaaaaa/*{bgColorShadow}*/;
opacity: .3/*{opacityShadow}*/;
border-radius: 8px/*{cornerRadiusShadow}*/;
}

@ -78,11 +78,6 @@ $ng-modal-image-width: $ng-modal-image-height
//+media($large-screen)
width: 40%
margin-top: 10em
.ui-select-container
.select2-display-none
display: none
ul
margin-left: 0
.modal-header
padding: 0

@ -0,0 +1,82 @@
# Select2
## select2 (jQuery)
```
<div style="min-height: 100px">
<select id="select2-example">
<option>one</option>
<option>two</option>
<option>three</option>
</select>
</div>
```
```
@javascript
jQuery(function($) {
$('#select2-example').select2();
});
```
## ui-select (Angular)
```
<div ng-controller="UiSelectExample" style="min-height: 100px">
<ui-select ng-model="person.selected" theme="select2" ng-disabled="disabled" style="min-width: 300px;">
<ui-select-match placeholder="Select a person in the list or search their name">{{$select.selected.name}}</ui-select-match>
<ui-select-choices repeat="person in people | filter: $select.search">
<div ng-bind-html="person.name | highlight: $select.search"></div>
<small>
email: {{person.email}}
</small>
</ui-select-choices>
</ui-select>
</div>
```
## ui-select (Angular): multiple
```
<div ng-controller="UiSelectExample" style="min-height: 100px">
<ui-select multiple ng-model="selectedPeople" theme="select2" ng-disabled="disabled" style="min-width: 300px;">
<ui-select-match placeholder="Select a person in the list or search their name">{{$item.name}}</ui-select-match>
<ui-select-choices repeat="person in people | filter: $select.search">
<div ng-bind-html="person.name | highlight: $select.search"></div>
<small>
email: {{person.email}}
</small>
</ui-select-choices>
</ui-select>
</div>
```
```
@javascript
angular.module('openproject-style-guide').controller('UiSelectExample', ['$scope', function($scope) {
$scope.disabled = undefined;
$scope.enable = function() {
$scope.disabled = false;
};
$scope.disable = function() {
$scope.disabled = true;
};
$scope.person = {};
$scope.people = [
{ name: 'Adam', email: 'adam@email.com' },
{ name: 'Amalie', email: 'amalie@email.com' },
{ name: 'Wladimir', email: 'wladimir@email.com' },
{ name: 'Samantha', email: 'samantha@email.com' },
{ name: 'Estefanía', email: 'estefanía@email.com' },
{ name: 'Natasha', email: 'natasha@email.com' },
{ name: 'Nicole', email: 'nicole@email.com' },
{ name: 'Adrian', email: 'adrian@email.com' }
];
$scope.selectedPeople = [$scope.people[5], $scope.people[4]];
}]);
```

@ -1,31 +1,30 @@
/*-- copyright
OpenProject is a project management system.
Copyright (C) 2012-2015 the OpenProject Foundation (OPF)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 3.
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
Copyright (C) 2006-2013 Jean-Philippe Lang
Copyright (C) 2010-2013 the ChiliProject Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.rdoc for more details.
++*/
//-- copyright
// OpenProject is a project management system.
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF)
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License version 3.
//
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
// Copyright (C) 2006-2013 Jean-Philippe Lang
// Copyright (C) 2010-2013 the ChiliProject Team
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// See doc/COPYRIGHT.rdoc for more details.
//++
.project-search-results {
box-sizing: content-box; /* Opera/IE 8+ */
@ -45,7 +44,7 @@ See doc/COPYRIGHT.rdoc for more details.
/* Indirectly styling size of result list */
.select2-container {
position: static;
position: relative;
max-width: 350px;
width:100%;
}
@ -66,7 +65,7 @@ See doc/COPYRIGHT.rdoc for more details.
.select2-results .select2-searching,
.select2-results .select2-more-results
{
background: url('~select2/select2-spinner.gif') no-repeat scroll 100% center #fff;
background: image-url('select2/select2-spinner.gif') no-repeat scroll 100% center #fff;
}
@ -114,3 +113,16 @@ See doc/COPYRIGHT.rdoc for more details.
.select2-drop-mask {
z-index: 30000;
}
.select2-display-none {
display: none;
}
.ui-select-container {
// HACK. TODO: Remove ul overrides in various places.
// See: https://community.openproject.org/work_packages/18330
ul {
margin-left: 0;
}
}

@ -57,7 +57,7 @@ div.wiki
background-position: 0% 60%
background-repeat: no-repeat
padding-left: 12px
background-image: url(image-path('external.png'))
background-image: image-url('external.png')
pre
margin: 1em 1em 1em 1.6em
@ -86,7 +86,7 @@ div.wiki
width: auto
a
font-weight: normal
background-image: url(image-path('arrow-down.png'))
background-image: image-url('arrow-down.png')
background-repeat: no-repeat
background-position: 0% 60%
padding-left: 16px
@ -147,47 +147,47 @@ h1:hover, h2:hover, h3:hover
min-height: 24px
&.see-also
background: url(image-path('wiki_styles/see-also.png')) 4px 4px no-repeat #f5fffa
background: image-url('wiki_styles/see-also.png') 4px 4px no-repeat #f5fffa
border: 1px solid #AAB1AD
&.smallsee-also
background: url(image-path('wiki_styles/see-also_small.png')) 4px 4px no-repeat #f5fffa
background: image-url('wiki_styles/see-also_small.png') 4px 4px no-repeat #f5fffa
border: 1px solid #AAB1AD
&.caution
background: url(image-path('wiki_styles/caution.png')) 4px 6px no-repeat #f5fffa
background: image-url('wiki_styles/caution.png') 4px 6px no-repeat #f5fffa
border: 1px solid #AAB1AD
&.smallcaution
background: url(image-path('wiki_styles/caution_small.png')) 4px 4px no-repeat #f5fffa
background: image-url('wiki_styles/caution_small.png') 4px 4px no-repeat #f5fffa
border: 1px solid #AAB1AD
&.important
background: url(image-path('wiki_styles/important.png')) 4px 7px no-repeat #F0F8FF
background: image-url('wiki_styles/important.png') 4px 7px no-repeat #F0F8FF
border: 1px solid #C1C8CF
&.smallimportant
background: url(image-path('wiki_styles/important_small.png')) 4px 6px no-repeat #F0F8FF
background: image-url('wiki_styles/important_small.png') 4px 6px no-repeat #F0F8FF
border: 1px solid #C1C8CF
&.info
background: url(image-path('wiki_styles/info.png')) 4px 4px no-repeat #FFFFE0
background: image-url('wiki_styles/info.png') 4px 4px no-repeat #FFFFE0
border: 1px solid #FFFF00
&.smallinfo
background: url(image-path('wiki_styles/info_small.png')) 4px 4px no-repeat #FFFFE0
background: image-url('wiki_styles/info_small.png') 4px 4px no-repeat #FFFFE0
border: 1px solid #FFFF00
&.smalltip
background: url(image-path('wiki_styles/tip_small.png')) 4px 5px no-repeat #F5FFFA
background: image-url('wiki_styles/tip_small.png') 4px 5px no-repeat #F5FFFA
border: 1px solid #C7CFCA
&.note
background: url(image-path('wiki_styles/note.png')) 6px 4px no-repeat #F5FFFA
background: image-url('wiki_styles/note.png') 6px 4px no-repeat #F5FFFA
border: 1px solid #C7CFCA
&.smallnote
background: url(image-path('wiki_styles/note_small.png')) 5px 4px no-repeat #F5FFFA
background: image-url('wiki_styles/note_small.png') 5px 4px no-repeat #F5FFFA
border: 1px solid #C7CFCA
.quick_info .label

@ -37,8 +37,6 @@
.add-relation
.select2
width: 350px
.select2-display-none
display: none
.select2-drop
width: 350px
top: auto

@ -33,8 +33,6 @@
width: 400px
.select2-with-searchbox
position: relative
.select2-display-none
display: none
.ui-select-choices
max-height: 350px
input[type='text']

@ -25,10 +25,15 @@
*
* See doc/COPYRIGHT.rdoc for more details. ++
*/
//= require ../javascripts/bundles/openproject-global
//= require ../javascripts/bundles/openproject-core-app
//= require_tree ../javascripts/bundles
//= require print
//= require scm
//= require top-shelf
//= require openproject_plugins
//= require_self
@import open_project_global/all
@ -97,5 +102,8 @@
@import content/autocomplete
@import content/diff
@import content/jquery_ui
@import content/select2
@import misc_legacy
@import jstoolbar

@ -82,7 +82,7 @@ ul.breadcrumb
float: left
margin: 0 0 0 10px
padding: 0 25px 0 0
background: url(image-path('breadcrumb-list.png')) no-repeat right center
background: image-url('breadcrumb-list.png') no-repeat right center
#breadcrumb a.breadcrumb-project-title
font-size: $breadcrumb-highlighted-font-size

@ -204,7 +204,7 @@
margin: 0 0 10px 0
.select2-search input
background: $header-drop-down-projects-search-input-bg-color url(image-path('magnifier.png')) no-repeat 94% center
background: $header-drop-down-projects-search-input-bg-color image-url('magnifier.png') no-repeat 94% center
margin: 10px 10px
padding: 9px 7px 9px 10px
border: none

@ -56,7 +56,7 @@ $header-drop-down-item-font-color: $body-font-color !default
$header-drop-down-item-font-hover-color: #FFFFFF !default
$header-logo-bg-color: #06799F !default
$header-home-link-bg: url(image-path('logo_openproject_white_big.png')) no-repeat 20px 0 !default
$header-home-link-bg: image-url('logo_openproject_white_big.png') no-repeat 20px 0 !default
$header-drop-down-projects-search-font-color: $body-font-color !default
$header-drop-down-projects-search-bg-color: #E0E0E0 !default

@ -40,7 +40,7 @@ div.changeset-changes ul
li.change
list-style-type:none
background-image: url(image-path('bullet_black.png'))
background-image: image-url('bullet_black.png')
background-position: 1px 1px
background-repeat: no-repeat
padding-top: 1px
@ -49,21 +49,21 @@ li.change
margin: 0
&.folder
background-image: url(image-path('folder_open.png'))
background-image: image-url('folder_open.png')
&.change-A
background-image: url(image-path('folder_open_add.png'))
background-image: image-url('folder_open_add.png')
&.change-M
background-image: url(image-path('folder_open_orange.png'))
background-image: image-url('folder_open_orange.png')
&.change-A
background-image: url(image-path('bullet_add.png'))
background-image: image-url('bullet_add.png')
&.change-M
background-image: url(image-path('bullet_orange.png'))
background-image: image-url('bullet_orange.png')
&.change-C
background-image: url(image-path('bullet_blue.png'))
background-image: image-url('bullet_blue.png')
&.change-R
background-image: url(image-path('bullet_purple.png'))
background-image: image-url('bullet_purple.png')
&.change-D
background-image: url(image-path('bullet_delete.png'))
background-image: image-url('bullet_delete.png')
.copied-from
font-style: italic

@ -36,6 +36,9 @@ styleguide-sass: |
.livingstyleguide--code-block
max-height: 300px
javascript-before:
- "/assets/styleguide.js"
header: |
<header class="livingstyleguide--header">
<div class="styleguide-banner">

@ -0,0 +1 @@
//= require ../javascripts/bundles/openproject-global

@ -27,5 +27,7 @@
#++
NonStupidDigestAssets.whitelist = [
'styleguide.html'
'styleguide.html',
'styleguide.css',
'styleguide.js'
]

@ -6,9 +6,13 @@ html
meta(content="The LivingStyleGuide Gem – http://livingstyleguide.org", name="generator")
meta(name="description", content=title)
title= title
link(rel='stylesheet', type='text/css', href='/assets/bundles/openproject-global.css')
!= stylesheet
script(src='/assets/bundles/openproject-global.js')
script.
angular.module('openproject-style-guide', ['ui.select', 'ngSanitize'])
body.livingstyleguide
body.livingstyleguide(ng-app='openproject-style-guide', ng-strict-di=true)
header.livingstyleguide--header
.styleguide-banner

@ -40,7 +40,12 @@ require('jquery-ujs');
require('jquery-ui/ui/jquery-ui.js');
require('jquery-ui/ui/i18n/jquery.ui.datepicker-en-GB.js');
require('jquery-ui/ui/i18n/jquery.ui.datepicker-de.js');
require('jquery-ui/themes/base/jquery-ui.css');
require('./misc/datepicker-defaults');
require('jquery-ui/themes/base/jquery.ui.core.css');
require('jquery-ui/themes/base/jquery.ui.datepicker.css');
// TODO: move require to backlogs plugin
require('jquery-ui/themes/base/jquery.ui.dialog.css');
require('momentjs');
require('momentjs/lang/en-gb.js');
@ -56,4 +61,9 @@ require('Caret.js/src/jquery.caret.js');
require('select2/select2.js');
require('select2/select2.css');
require('select2_customizing.css');
require('angular');
require('angular-sanitize');
require('ui-select/dist/select');
require('ui-select/dist/select.css');

@ -0,0 +1,71 @@
//-- copyright
// OpenProject is a project management system.
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF)
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License version 3.
//
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
// Copyright (C) 2006-2013 Jean-Philippe Lang
// Copyright (C) 2010-2013 the ChiliProject Team
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// See doc/COPYRIGHT.rdoc for more details.
//++
window.CS = window.CS || {};
jQuery(function($) {
var regions = $.datepicker.regional;
var regional = regions[CS.lang] || regions[""];
$.datepicker.setDefaults(regional);
var gotoToday = $.datepicker._gotoToday;
$.datepicker._gotoToday = function (id) {
gotoToday.call(this, id);
var target = $(id),
inst = this._getInst(target[0]),
dateStr = $.datepicker._formatDate(inst);
target.val(dateStr);
target.blur();
$.datepicker._hideDatepicker();
};
var defaults = {
showWeek: true,
changeMonth: true,
changeYear: true,
yearRange: "c-100:c+10",
dateFormat: 'yy-mm-dd',
showButtonPanel: true,
calculateWeek: function (day) {
var dayOfWeek = new Date(+day);
if (day.getDay() != 1) {
dayOfWeek.setDate(day.getDate() - day.getDay() + 1);
}
return $.datepicker.iso8601Week(dayOfWeek);
}
};
if (CS.firstWeekDay && CS.firstWeekDay !== "") {
defaults.firstDay = parseInt(CS.firstWeekDay, 10);
}
$.datepicker.setDefaults(defaults);
});

@ -36,8 +36,6 @@ I18n.addTranslations = function(locale, translations) {
I18n.translations[locale] = _.merge(I18n.translations[locale], translations);
};
var angular = require('angular');
require('angular-animate');
require('angular-aria');
require('angular-modal');
@ -52,16 +50,12 @@ require('angular-ui-select2');
require('angular-ui-select2-sortable');
require('angular-ui-date');
require('angular-sanitize');
require('angular-truncate');
require('angular-feature-flags');
require('angular-busy/dist/angular-busy');
require('angular-busy/dist/angular-busy.css');
require('ui-select/dist/select');
require('ui-select/dist/select.css');
require('angular-context-menu');
require('mousetrap');

@ -36,6 +36,7 @@ var watch = require('gulp-watch');
var autoprefixer = require('gulp-autoprefixer');
var livingstyleguide = require('gulp-livingstyleguide');
var gulpFilter = require('gulp-filter');
var replace = require('gulp-replace');
var protractor = require('gulp-protractor').protractor,
webdriverStandalone = require('gulp-protractor').webdriver_standalone,
@ -77,6 +78,8 @@ gulp.task('sass', function() {
'./bower_components/bourbon/app/assets/stylesheets'
]
}))
// HACK: remove asset helper that is only available with asset pipeline
.pipe(replace(/image\-url\(\"/g, 'url("/assets/'))
.pipe(autoprefixer({
cascade: false
}))
@ -98,6 +101,7 @@ gulp.task('styleguide', function () {
gulp.src('../app/assets/stylesheets/styleguide.html.lsg')
.pipe(livingstyleguide({template: 'app/assets/styleguide.jade'}))
.pipe(cssFilter)
.pipe(replace(/image\-url\(\"/g, 'url("/assets/'))
.pipe(autoprefixer({
cascade: false
}))

@ -3,6 +3,52 @@
"URIjs": {
"version": "1.14.1"
},
"autoprefixer-loader": {
"version": "1.2.0",
"dependencies": {
"autoprefixer-core": {
"version": "5.1.7",
"dependencies": {
"browserslist": {
"version": "0.2.0"
},
"num2fraction": {
"version": "1.0.1"
},
"caniuse-db": {
"version": "1.0.30000092"
},
"postcss": {
"version": "4.0.6",
"dependencies": {
"source-map": {
"version": "0.2.0",
"dependencies": {
"amdefine": {
"version": "0.1.0"
}
}
},
"js-base64": {
"version": "2.1.7"
}
}
}
}
},
"loader-utils": {
"version": "0.2.6",
"dependencies": {
"json5": {
"version": "0.1.0"
},
"big.js": {
"version": "2.5.1"
}
}
}
}
},
"body-parser": {
"version": "1.10.1",
"dependencies": {
@ -1272,6 +1318,33 @@
}
}
},
"extract-text-webpack-plugin": {
"version": "0.3.8",
"dependencies": {
"async": {
"version": "0.2.10"
},
"source-map": {
"version": "0.1.43",
"dependencies": {
"amdefine": {
"version": "0.1.0"
}
}
},
"loader-utils": {
"version": "0.2.6",
"dependencies": {
"json5": {
"version": "0.1.0"
},
"big.js": {
"version": "2.5.1"
}
}
}
}
},
"file-loader": {
"version": "0.8.1",
"dependencies": {
@ -3363,6 +3436,55 @@
}
}
},
"gulp-replace": {
"version": "0.5.3",
"dependencies": {
"istextorbinary": {
"version": "1.0.2",
"dependencies": {
"textextensions": {
"version": "1.0.1"
},
"binaryextensions": {
"version": "1.0.0"
}
}
},
"replacestream": {
"version": "2.0.0",
"dependencies": {
"through": {
"version": "2.3.6"
}
}
},
"through2": {
"version": "0.6.3",
"dependencies": {
"readable-stream": {
"version": "1.0.33",
"dependencies": {
"core-util-is": {
"version": "1.0.1"
},
"isarray": {
"version": "0.0.1"
},
"string_decoder": {
"version": "0.10.31"
},
"inherits": {
"version": "2.0.1"
}
}
},
"xtend": {
"version": "4.0.0"
}
}
}
}
},
"gulp-ruby-sass": {
"version": "0.7.1",
"dependencies": {

@ -14,6 +14,7 @@
"gulp-jshint": "^1.8.5",
"gulp-livingstyleguide": "~0.1.4",
"gulp-protractor": "0.0.11",
"gulp-replace": "^0.5.3",
"gulp-ruby-sass": "^0.7.1",
"gulp-watch": "^1.1.0",
"gulp-webpack": "^1.0.0",
@ -40,10 +41,12 @@
},
"dependencies": {
"URIjs": "^1.14.1",
"autoprefixer-loader": "^1.2.0",
"bower": "~1.3.8",
"css-loader": "^0.9.0",
"exports-loader": "^0.6.2",
"expose-loader": "^0.6.0",
"extract-text-webpack-plugin": "^0.3.8",
"file-loader": "^0.8.1",
"html-loader": "^0.2.3",
"json-loader": "^0.5.1",

@ -1,8 +1,11 @@
var webpack = require('webpack'),
fs = require('fs'),
path = require('path'),
_ = require('lodash'),
pathConfig = require('./rails-plugins.conf');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var pluginEntries = _.reduce(pathConfig.pluginNamesPaths, function(entries, path, name) {
entries[name.replace(/^openproject\-/, '')] = name;
return entries;
@ -13,6 +16,11 @@ var pluginAliases = _.reduce(pathConfig.pluginNamesPaths, function(entries, plug
return entries;
}, {});
var browsersListConfig = fs.readFileSync(path.join(__dirname, '..', 'browserslist'), 'utf8');
var browsersList = JSON.stringify(_.filter(browsersListConfig.split('\n'), function(entry) {
return entry && entry.charAt(0) !== '#';
}));
module.exports = {
context: __dirname + '/app',
@ -34,7 +42,13 @@ module.exports = {
{ test: /[\/]moment\.js$/, loader: 'expose?moment' },
{ test: /[\/]mousetrap\.js$/, loader: 'expose?Mousetrap' },
{ test: /[\/]vendor[\/]i18n\.js$/, loader: 'expose?I18n' },
{ test: /\.css$/, loader: 'style-loader!css-loader' },
{
test: /\.css$/,
loader: ExtractTextPlugin.extract(
'style-loader',
'css-loader!autoprefixer-loader?{browsers:' + browsersList + ',cascade:false}'
)
},
{ test: /\.png$/, loader: 'url-loader?limit=100000&mimetype=image/png' },
{ test: /\.gif$/, loader: 'file-loader' },
{ test: /\.jpg$/, loader: 'file-loader' },
@ -76,6 +90,7 @@ module.exports = {
},
plugins: [
new ExtractTextPlugin('openproject-[name].css'),
new webpack.ProvidePlugin({
'_': 'lodash',
'URI': 'URIjs',

Loading…
Cancel
Save