initial commit
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#= require ./dunlop/base
|
||||
#= require ./dunlop-semantic/ui-dropdown
|
||||
#= require ./dunlop-semantic/ui-checkbox
|
||||
#= require ./dunlop-semantic/calendar
|
||||
#= require dunlop/time-display
|
||||
#= require moment
|
||||
#= require moment/nl
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
||||
#= require ./calendar-vendor
|
||||
Dunlop.register_setup 'calendar', (target) ->
|
||||
target.find('.datepicker').calendar
|
||||
firstDayOfWeek: 1
|
||||
type: 'date'
|
||||
formatter:
|
||||
date: (date, settings) ->
|
||||
return '' unless date
|
||||
moment(date).format().substr(0, 10)
|
||||
datetime: (date, settings) ->
|
||||
return '' unless date
|
||||
moment(date).format().substr(0, 10)
|
||||
|
||||
target.find('.timepicker').calendar
|
||||
ampm: false
|
||||
firstDayOfWeek: 1
|
||||
type: 'time'
|
||||
formatter:
|
||||
time: (date, settings) ->
|
||||
return '' unless date
|
||||
date.toISOString()
|
||||
moment(date).format()
|
||||
datetime: (date, settings) ->
|
||||
return '' unless date
|
||||
moment(date).format()
|
||||
@@ -0,0 +1,2 @@
|
||||
Dunlop.register_setup 'ui-checkbox', (target) ->
|
||||
target.find('.ui.checkbox').checkbox()
|
||||
@@ -0,0 +1,15 @@
|
||||
Dunlop.register_setup 'ui-dropdown', (target) ->
|
||||
target.find('.ui.dropdown').each ->
|
||||
el = $(@)
|
||||
settings = el.data() || {}
|
||||
can_clear = not el.find('option:first').val()
|
||||
settings.fireOnInit = true
|
||||
settings.onChange = (value, text, item) ->
|
||||
return unless can_clear
|
||||
dropdown = $(@)
|
||||
if value
|
||||
clear_icon = $('<i class="delete icon"></i>').click ->
|
||||
dropdown.dropdown('clear')
|
||||
$(@).remove()
|
||||
el.after clear_icon
|
||||
el.dropdown settings
|
||||
@@ -0,0 +1,63 @@
|
||||
#= require ./dunlop/base
|
||||
#= require dunlop/collapsible
|
||||
#= require dunlop/categorize-as-button
|
||||
#= require dunlop/collection-button
|
||||
#= require dunlop/translations
|
||||
#= require dunlop/display-badges
|
||||
#= require dunlop/time-display
|
||||
#= require pickadate/picker
|
||||
#= require pickadate/picker.date
|
||||
#= require pickadate/picker.time
|
||||
#= require inflection
|
||||
#= require js-routes
|
||||
#= require moment
|
||||
#= require moment/nl
|
||||
#= require record_collection/all
|
||||
Dunlop.register_setup (target)->
|
||||
target.find('input.datepicker').each ->
|
||||
options =
|
||||
format: 'yyyy-mm-dd'
|
||||
editable: true
|
||||
selectMonths: true
|
||||
if selectYears = $(@).data('selectYears')
|
||||
options.selectYears = selectYears
|
||||
$(@).pickadate(options)
|
||||
|
||||
##DEPRICATED use data-bytes instead
|
||||
#$('[data-size]').each (i)->
|
||||
# bytes = $(@).data("size")
|
||||
# $(@).text human_size(bytes)
|
||||
|
||||
|
||||
target.optionals()
|
||||
|
||||
$ ->
|
||||
try
|
||||
HawkEye.add_general_configuration
|
||||
facet:
|
||||
state:
|
||||
colors:
|
||||
uncategorized: "#eee"
|
||||
unplanned: "#aaa"
|
||||
planned: "#99b"
|
||||
active: "#55f"
|
||||
overdue: "#ffa500"
|
||||
any_rejected: "#e44"
|
||||
all_completed: "#5b5"
|
||||
# workflow_step - duplicates
|
||||
pending: "#eee"
|
||||
processing: "#55f"
|
||||
rejected: "#e44"
|
||||
completed: "#5b5"
|
||||
|
||||
selector = $(document).multi_select
|
||||
changed: ->
|
||||
selection_text = "#{@selected_count()} van de #{@total_count()} orders geselecteerd"
|
||||
if totalCount = @get('table').data('recordCount')
|
||||
selection_text = "#{selection_text} (#{totalCount} totaal)"
|
||||
$('.multi-select-statistics').html selection_text
|
||||
return unless selector
|
||||
# Find all buttons in the table footer and attach the action given their action data attribute
|
||||
return unless table = selector.get('table')
|
||||
selector.trigger 'changed'
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
@human_size = (bytes)->
|
||||
exp = Math.log(bytes) / Math.log(1024) | 0
|
||||
result = (bytes / Math.pow(1024, exp))
|
||||
precision = if result < 0 then 2 else 1
|
||||
result = result.toFixed(precision)
|
||||
addition = if exp is 0 then "bytes" else "KMGTPEZY"[exp - 1] + "B"
|
||||
"#{result} #{addition}"
|
||||
Dunlop.register_setup 'human-size', (target) ->
|
||||
target.find('[data-bytes]').each ->
|
||||
display = $(@)
|
||||
display.text human_size(display.data('bytes'))
|
||||
@@ -0,0 +1,43 @@
|
||||
#= require_self
|
||||
#= require ./helpers
|
||||
#= require_tree ./active_support
|
||||
class Dunlop
|
||||
constructor: ->
|
||||
@setup_callbacks = {}
|
||||
@action_in_progress = 0
|
||||
|
||||
setup: (target, callback)->
|
||||
@action_in_progress = 1
|
||||
target ||= $(document)
|
||||
for setup_label, callbacks_of_label of @setup_callbacks
|
||||
callbacks_of_label.forEach (callback)=>
|
||||
callback.call(@, target)
|
||||
|
||||
|
||||
|
||||
# Set all optial boolean labels to the maximum label. NOTE: this is a hack
|
||||
delay 300, ->
|
||||
labels = $('.optional-boolean-label, .optional-input-activator-label')
|
||||
label_minimum_length = if labels.filter( -> $(@).parents('.optional-attribute-container').data('one') ).length then 356 else 320
|
||||
if labels.length
|
||||
labels.each -> label_minimum_length = $(@).width() if $(@).width() > label_minimum_length
|
||||
#max_optional_label_width = Math.max.apply(null, labels.map((i, el) -> $(el).width()).toArray())
|
||||
#max_optional_label_width = Math.max(max_optional_label_width, 356) # form display width match for big screens = 366 - 10
|
||||
labels.css 'width', "#{label_minimum_length + 10}px" if label_minimum_length
|
||||
|
||||
if callback
|
||||
callback.call(@)
|
||||
@action_in_progress = 0
|
||||
else
|
||||
@action_in_progress = 0
|
||||
|
||||
selected_ids: -> MultiSelect.selected_ids()
|
||||
|
||||
register_setup: (label_or_callback, labelled_callback)->
|
||||
unless labelled_callback?
|
||||
labelled_callback = label_or_callback
|
||||
label_or_callback = 'anonymous'
|
||||
(@setup_callbacks[label_or_callback] ||= []).push labelled_callback
|
||||
|
||||
|
||||
@Dunlop = new Dunlop()
|
||||
@@ -0,0 +1,16 @@
|
||||
Dunlop.register_setup 'categorize-as-button', (target)->
|
||||
button = $('#categorize-as-button')
|
||||
return unless button.length
|
||||
button.click ->
|
||||
selected_ids = Dunlop.selected_ids() # proxy for MultiSelect.selected_ids()
|
||||
return alert("Nothing selected") unless selected_ids.length
|
||||
|
||||
selector = $("#categorize-as-scenario-selector")
|
||||
return unless target_scenario = selector.val()
|
||||
if confirmation_t = button.data("confirmationT")
|
||||
message = t_substitute_params confirmation_t,
|
||||
target_scenario: selector.text() || target_scenario
|
||||
return unless confirm(message)
|
||||
$.post Routes.dunlop_categorize_as_workflow_instances_path(),
|
||||
ids: selected_ids.join("~")
|
||||
scenario: target_scenario
|
||||
@@ -0,0 +1,12 @@
|
||||
Dunlop.register_setup 'collapsible', (target)->
|
||||
collapsible_containers = target.find('.collapsible-container')
|
||||
collapsible_containers.each (i, el) ->
|
||||
$(el).children('.collapsible-title').click -> $(el).toggleClass('collapsed')
|
||||
|
||||
target.find('.collapsible-expand-all').dblclick ->
|
||||
if $(@).hasClass('opened')
|
||||
collapsible_containers.addClass('collapsed')
|
||||
$(@).removeClass('opened')
|
||||
else
|
||||
collapsible_containers.removeClass('collapsed')
|
||||
$(@).addClass('opened')
|
||||
@@ -0,0 +1,42 @@
|
||||
collection_button_click = (target, options = {}) ->
|
||||
return if target.data('confirmation') and not confirm(target.data('confirmation'))
|
||||
action_name = target.data('action')
|
||||
[resource, scenario] = full_resource.split('/') if full_resource = target.data('resource')
|
||||
if not full_resource and target.attr('href') # direct collection_edit links
|
||||
url = "#{target.attr('href')}&reveal=yes"
|
||||
else
|
||||
request_params = options.request_params || target.data('requestParams')
|
||||
return unless request_params
|
||||
# important to make a copy of options.request_params, otherwize the ids will be persisted in there
|
||||
request_params = $.extend({}, request_params)
|
||||
|
||||
# See if multiselect ids is requested
|
||||
for k, v of request_params
|
||||
if v is 'selected_ids' # Implement multi select by inserting ids here
|
||||
selected_ids = Dunlop.selected_ids()
|
||||
return alert("Nothing selected") unless selected_ids.length
|
||||
request_params[k] = selected_ids.join('~')
|
||||
break
|
||||
|
||||
url_path ="collection_edit_#{resource}_#{scenario.pluralize()}_path"
|
||||
request_params['reveal'] = 'yes'
|
||||
return alert("The route #{url_path} does not exist") unless Routes[url_path]
|
||||
url = Routes[url_path](request_params)
|
||||
Dunlop.action_in_progress = 1
|
||||
$.get url, (result) ->
|
||||
$('#workflow-step-modal .content').html result
|
||||
$('#workflow-step-modal').foundation('reveal', 'open')
|
||||
Dunlop.setup $('#workflow-step-modal'), ->
|
||||
$('#workflow-step-modal .workflow-step-back-button').click (e) ->
|
||||
e.preventDefault()
|
||||
$('#workflow-step-modal').foundation('reveal', 'close')
|
||||
false
|
||||
false
|
||||
|
||||
Dunlop.register_setup 'collection-button', (target) ->
|
||||
# setup collection edit buttons
|
||||
target.find('.collection-edit').click (evt) ->
|
||||
evt.preventDefault()
|
||||
collection_button_click $(this)
|
||||
false
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
Dunlop.register_setup 'display_badges', (target)->
|
||||
target.find('.display-badge').click ->
|
||||
el = $(this)
|
||||
return if el.find('a').length # there is a link given in the badge
|
||||
content = $('.display-badge-info-content')
|
||||
popup = $('#display-badge-info-popup')
|
||||
data =
|
||||
resource: el.data('resource')
|
||||
id: el.data('id')
|
||||
state: el.data('state')
|
||||
workflow_instance_batch_id: el.data('workflowInstanceBatchId')
|
||||
data.target = el.data('target') if el.data('target')
|
||||
|
||||
$.get "/dunlop/badge_info?#{$.param(data)}", (result)->
|
||||
content.html result
|
||||
popup.foundation 'reveal', 'open'
|
||||
Dunlop.setup content
|
||||
@@ -0,0 +1,33 @@
|
||||
# This is the same as setTimeout but then
|
||||
# with switched arguments for coffeescript friendlyness.
|
||||
# @a = 3
|
||||
# delay =>
|
||||
# console.log "The value of a is #{@a}"
|
||||
# or to delay not a second but a self defined amount of time in milliseconds:
|
||||
# delay 10000, =>
|
||||
# console.log "The value of a is #{@a}"
|
||||
@delay = (time = 1000, fn, args...) ->
|
||||
setTimeout fn, time, args...
|
||||
|
||||
# based on http://www.thecodeship.com/web-development/alternative-to-javascript-evil-setinterval/
|
||||
# can be used as:
|
||||
# to keep scope and execute every second:
|
||||
# @a = 3
|
||||
# interval =>
|
||||
# console.log "Hi there with a is: #{@a}"
|
||||
# to log every 200 milliseconds without conservation of this scope:
|
||||
# interval 200, -> console.log "Hi there"
|
||||
# to execute a maximum number (30) of times:
|
||||
# interval 200, 30, -> console.log "Hi there"
|
||||
@interval = (wait = 1000, extra_args..., func)->
|
||||
times = extra_args[0]
|
||||
interv = do (wait, times)->
|
||||
->
|
||||
return if times? and times-- <= 0
|
||||
setTimeout interv, wait
|
||||
try
|
||||
func.call null
|
||||
catch e
|
||||
times = 0
|
||||
throw e.toString()
|
||||
setTimeout interv, wait
|
||||
@@ -0,0 +1,25 @@
|
||||
Dunlop.register_setup 'time-display', (target) ->
|
||||
# Display load time
|
||||
target.find('[data-time]').each (i) ->
|
||||
time = moment($(@).data('time'))
|
||||
moment_format = $(@).data('format') || 'LLL' # LL means only date: TODO: Make default LLL since there is a data-date option -> done!
|
||||
switch moment_format
|
||||
when 'relative'
|
||||
$(@).text time.fromNow()
|
||||
interval 10000, =>
|
||||
$(@).text time.fromNow()
|
||||
else
|
||||
$(@).text time.format(moment_format)
|
||||
|
||||
# Display date
|
||||
target.find('[data-date]').each (i) ->
|
||||
time = moment($(@).data('date'))
|
||||
moment_format = $(@).data('format') || 'LL' # LL means only date
|
||||
switch moment_format
|
||||
when 'relative'
|
||||
$(@).text time.fromNow()
|
||||
interval 10000, =>
|
||||
$(@).text time.fromNow()
|
||||
else
|
||||
$(@).text time.format(moment_format)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
@$translations ||= {}
|
||||
|
||||
# dummy implementation of real client side translations
|
||||
@t ||= (path, vars={}) ->
|
||||
parts = path.split('.')
|
||||
parts[parts.length - 1]
|
||||
|
||||
@t_substitute_params ||= (msg, params)->
|
||||
for variable, value of params
|
||||
msg = msg.replace("%{#{variable}}", value)
|
||||
msg
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
@import ./dunlop/mixins
|
||||
|
||||
@import ./dunlop-semantic/calendar
|
||||
@import ./dunlop-semantic/ui-calendar-additions
|
||||
@import ./dunlop/components/environment-ribbon
|
||||
//@import ./dunlop/components/user_management
|
||||
|
||||
.ui.selection.dropdown > .delete.icon
|
||||
margin-right: 6px
|
||||
|
||||
.clearfix
|
||||
clear: both
|
||||
|
||||
.hide
|
||||
display: none !important
|
||||
|
||||
.form-actions
|
||||
clear: both
|
||||
margin-top: 12px
|
||||
padding-top: 8px
|
||||
border-top: 1px solid #ddd
|
||||
@@ -0,0 +1,142 @@
|
||||
/*!
|
||||
* # Semantic UI 0.0.8 - Calendar
|
||||
* http://github.com/semantic-org/semantic-ui/
|
||||
*
|
||||
*
|
||||
* Released under the MIT license
|
||||
* http://opensource.org/licenses/MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*******************************
|
||||
Popup
|
||||
*******************************/
|
||||
|
||||
.ui.calendar .ui.popup {
|
||||
max-width: none;
|
||||
padding: 0;
|
||||
border: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
|
||||
/*******************************
|
||||
Calendar
|
||||
*******************************/
|
||||
|
||||
.ui.calendar .calendar:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
|
||||
/*******************************
|
||||
Grid
|
||||
*******************************/
|
||||
|
||||
.ui.calendar .ui.popup .ui.grid {
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.ui.calendar .ui.popup .ui.grid > .column {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
||||
/*******************************
|
||||
Table
|
||||
*******************************/
|
||||
|
||||
.ui.calendar .ui.table.year,
|
||||
.ui.calendar .ui.table.month,
|
||||
.ui.calendar .ui.table.minute {
|
||||
min-width: 15em;
|
||||
}
|
||||
.ui.calendar .ui.table.day {
|
||||
min-width: 18em;
|
||||
}
|
||||
.ui.calendar .ui.table.hour {
|
||||
min-width: 20em;
|
||||
}
|
||||
.ui.calendar .ui.table tr th,
|
||||
.ui.calendar .ui.table tr td {
|
||||
padding: 0.5em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.ui.calendar .ui.table tr th {
|
||||
border-left: none;
|
||||
}
|
||||
.ui.calendar .ui.table tr th .icon {
|
||||
margin: 0;
|
||||
}
|
||||
.ui.calendar .ui.table tr th .icon {
|
||||
margin: 0;
|
||||
}
|
||||
.ui.calendar .ui.table tr:first-child th {
|
||||
position: relative;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
.ui.calendar .ui.table.day tr:first-child th {
|
||||
border: none;
|
||||
}
|
||||
.ui.calendar .ui.table.day tr:nth-child(2) th {
|
||||
padding-top: 0.2em;
|
||||
padding-bottom: 0.3em;
|
||||
}
|
||||
.ui.calendar .ui.table tr td {
|
||||
padding-left: 0.1em;
|
||||
padding-right: 0.1em;
|
||||
}
|
||||
.ui.calendar .ui.table tr .link {
|
||||
cursor: pointer;
|
||||
}
|
||||
.ui.calendar .ui.table tr .prev.link {
|
||||
width: 14.28571429%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
.ui.calendar .ui.table tr .next.link {
|
||||
width: 14.28571429%;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
.ui.calendar .ui.table tr .disabled {
|
||||
pointer-events: none;
|
||||
color: rgba(40, 40, 40, 0.3);
|
||||
}
|
||||
|
||||
/*--------------
|
||||
States
|
||||
---------------*/
|
||||
|
||||
.ui.calendar .ui.table tr td.today {
|
||||
font-weight: bold;
|
||||
}
|
||||
.ui.calendar .ui.table tr td.range {
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
color: rgba(0, 0, 0, 0.95);
|
||||
box-shadow: none;
|
||||
}
|
||||
.ui.calendar .ui.table.inverted tr td.range {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
color: #ffffff;
|
||||
box-shadow: none;
|
||||
}
|
||||
.ui.calendar .calendar:focus .ui.table tbody tr td.focus,
|
||||
.ui.calendar .calendar.active .ui.table tbody tr td.focus {
|
||||
box-shadow: inset 0 0 0 1px #85B7D9;
|
||||
}
|
||||
.ui.calendar .calendar:focus .ui.table.inverted tbody tr td.focus,
|
||||
.ui.calendar .calendar.active .ui.table.inverted tbody tr td.focus {
|
||||
box-shadow: inset 0 0 0 1px #85B7D9;
|
||||
}
|
||||
|
||||
|
||||
/*******************************
|
||||
Theme Overrides
|
||||
*******************************/
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
// This fixes the issue of ember-semantic-ui-calendar not functioning inside a definition table
|
||||
// taken from ember-cli-dunlop
|
||||
.ui.definition.table .ui.calendar
|
||||
padding: 0
|
||||
table
|
||||
//border: 1px solid rgba(34,36,38,.15)
|
||||
border-radius: .28571429rem
|
||||
box-shadow: none
|
||||
color: rgba(0,0,0,.87)
|
||||
tr
|
||||
th
|
||||
pointer-events: all
|
||||
font-weight: bold
|
||||
color: rgba(0,0,0,.87)
|
||||
background-color: #F9FAFB
|
||||
&:nth-child(2)
|
||||
border-left: 0
|
||||
td
|
||||
pointer-events: all
|
||||
&:first-child:not(.ignored)
|
||||
background-color: white
|
||||
font-weight: normal
|
||||
&.disabled
|
||||
color: rgba(40, 40, 40, 0.3)
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
// import the CSS framework
|
||||
@import foundation/functions
|
||||
$row-width: 100%
|
||||
@import foundation
|
||||
.hide
|
||||
display: none !important
|
||||
|
||||
// override for the 'Home' navigation link
|
||||
.top-bar .name
|
||||
font-size: rem-calc(13)
|
||||
line-height: 45px
|
||||
|
||||
.top-bar .name a
|
||||
font-weight: normal
|
||||
color: white
|
||||
padding: 0 15px
|
||||
|
||||
// THESE ARE EXAMPLES YOU CAN MODIFY
|
||||
// create mixins using Foundation classes
|
||||
=twelve-columns
|
||||
@extend .small-12
|
||||
@extend .columns
|
||||
|
||||
=six-columns-centered
|
||||
@extend .small-6
|
||||
@extend .columns
|
||||
@extend .text-center
|
||||
|
||||
.inline-block
|
||||
display: inline-block
|
||||
|
||||
.progress
|
||||
.meter
|
||||
text-align: center
|
||||
color: white
|
||||
// create your own classes
|
||||
// to make views framework-neutral
|
||||
.column
|
||||
+six-columns-centered
|
||||
|
||||
.alert-box
|
||||
&.alert
|
||||
h1, h2, h3, h4
|
||||
color: white
|
||||
.form
|
||||
+grid-column(6)
|
||||
|
||||
.form-centered
|
||||
+six-columns-centered
|
||||
|
||||
.submit
|
||||
@extend .button
|
||||
@extend .radius
|
||||
|
||||
// apply styles to HTML elements
|
||||
// to make views framework-neutral
|
||||
main
|
||||
+twelve-columns
|
||||
background-color: #eee
|
||||
min-height: calc(100% - 70px)
|
||||
|
||||
section
|
||||
@extend .row
|
||||
margin-top: 20px
|
||||
@@ -0,0 +1,11 @@
|
||||
//= require pickadate/default
|
||||
//= require pickadate/default.date
|
||||
//= require pickadate/default.time
|
||||
//= require record_collection/all
|
||||
|
||||
$export-color: #626
|
||||
@import ./1st_load_framework
|
||||
@import font-awesome
|
||||
@import ./mixins
|
||||
@import ./components/*
|
||||
@import ./resources/*
|
||||
@@ -0,0 +1,17 @@
|
||||
$archived-color: #FFDB9D
|
||||
body.archived-mode
|
||||
main
|
||||
background-color: $archived-color
|
||||
table
|
||||
tr.archived
|
||||
&:nth-of-type(even)
|
||||
background-color: darken($archived-color, 12%)
|
||||
&:nth-of-type(odd)
|
||||
background-color: $archived-color
|
||||
div.record-archived
|
||||
background-color: $archived-color
|
||||
.top-bar
|
||||
.switch-to-archived-mode
|
||||
background-color: inherit
|
||||
.switch-to-active-mode
|
||||
background-color: #f92 !important
|
||||
@@ -0,0 +1,59 @@
|
||||
= default-subprocess($pending-background:#aaa, $pending-color:#555, $processing-background:#55f, $processing-color:white, $completed-background:#5b5, $completed-color:black, $rejected-background:#f55, $rejected-color:black)
|
||||
&.pending
|
||||
background-color: $pending-background
|
||||
color: $pending-color
|
||||
a
|
||||
color: $pending-color
|
||||
&.processing, &.active
|
||||
background-color: $processing-background
|
||||
color: $processing-color
|
||||
a
|
||||
color: $processing-color
|
||||
&.completed, &.all_completed
|
||||
background-color: $completed-background
|
||||
color: $completed-color
|
||||
a
|
||||
color: $completed-color
|
||||
&.rejected, &.any_rejected
|
||||
background-color: $rejected-background
|
||||
color: $rejected-color
|
||||
a
|
||||
color: $rejected-color
|
||||
&.overdue
|
||||
background-color: orange
|
||||
color: #fa0
|
||||
color: black
|
||||
.display-badge
|
||||
+radius($global-rounded)
|
||||
padding: 3px 8px
|
||||
cursor: pointer
|
||||
display: inline-block
|
||||
margin-left: 5px
|
||||
margin-bottom: 3px
|
||||
.badge-name
|
||||
.human-state
|
||||
padding-left: 4px
|
||||
display: none
|
||||
+default-subprocess
|
||||
|
||||
&.workflow_instance
|
||||
&.unplanned
|
||||
background-color: #aaa
|
||||
color: #555
|
||||
&.planned
|
||||
background-color: #aaa
|
||||
color: #555
|
||||
|
||||
// Show the state name in stead of scenario badge for badges prefixed in
|
||||
// the dom with class state
|
||||
.state
|
||||
.display-badge
|
||||
.badge-name
|
||||
display: none
|
||||
.human-state
|
||||
display: inline-block
|
||||
pre.badge-info-text
|
||||
+panel
|
||||
max-height: 200px
|
||||
overflow-x: scroll
|
||||
white-space: pre-wrap
|
||||
@@ -0,0 +1,7 @@
|
||||
.boolean-show
|
||||
@extend .fa, .fa-lg, .fa-square-o
|
||||
&.yes
|
||||
color: $success-color
|
||||
@extend .fa-check-square-o
|
||||
td.boolean-show-cell
|
||||
text-align: center
|
||||
@@ -0,0 +1,16 @@
|
||||
.collapsible-container
|
||||
.collapsible-title
|
||||
font-size: 1.4em
|
||||
font-weight: bold
|
||||
cursor: pointer
|
||||
span
|
||||
@extend .fa, .fa-arrow-down
|
||||
&.collapsed
|
||||
.collapsible-title
|
||||
span
|
||||
@extend .fa, .fa-arrow-right
|
||||
.collapsible-content
|
||||
display: none
|
||||
.migration-comments
|
||||
.thread_header
|
||||
display: none
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
Pickadate has some styling compatibility issues with foundation at the moment
|
||||
therefore this css file is to fix the most important issues untill and
|
||||
'official' fix is published
|
||||
.picker--opened
|
||||
select
|
||||
// Foundation fix
|
||||
margin: 0
|
||||
padding: 0
|
||||
.picker__button--today, .picker__button--clear, .picker__button--close
|
||||
color: #444
|
||||
@@ -0,0 +1,35 @@
|
||||
.display-row
|
||||
+grid-row
|
||||
.display-label
|
||||
font-weight: bold
|
||||
@media #{$small-only}
|
||||
+grid-column($columns:5)
|
||||
@media #{$medium-only}
|
||||
+grid-column($columns:4, $offset:1)
|
||||
@media #{$large-up}
|
||||
+grid-column(3)
|
||||
.display-field
|
||||
@media #{$small-only}
|
||||
+grid-column($columns: 5, $last-column:true)
|
||||
@media #{$medium-only}
|
||||
+grid-column($columns:4, $last-column:true)
|
||||
@media #{$large-up}
|
||||
+grid-column($columns: 3, $last-column:true)
|
||||
&.full
|
||||
@media #{$small-only}
|
||||
+grid-column($columns: 7, $last-column:true)
|
||||
@media #{$medium-only}
|
||||
+grid-column($columns:7, $last-column:true)
|
||||
@media #{$large-up}
|
||||
+grid-column($columns: 9, $last-column:true)
|
||||
pre.timewax-description
|
||||
+panel
|
||||
max-height: 200px
|
||||
overflow-x: scroll
|
||||
white-space: pre-wrap
|
||||
|
||||
pre.show-collection-edit-notes
|
||||
+panel
|
||||
max-height: 200px
|
||||
overflow-x: scroll
|
||||
white-space: pre-wrap
|
||||
@@ -0,0 +1,56 @@
|
||||
// inspired by http://www.cssportal.com/css-ribbon-generator/
|
||||
.environment-ribbon
|
||||
position: fixed
|
||||
left: -10px
|
||||
bottom: 0
|
||||
z-index: 1
|
||||
overflow: hidden
|
||||
width: 75px
|
||||
height: 75px
|
||||
text-align: right
|
||||
&.top-right
|
||||
margin-top: 45px
|
||||
left: auto
|
||||
right: -5px
|
||||
top: -5px
|
||||
|
||||
span
|
||||
font-size: 8px
|
||||
font-weight: bold
|
||||
text-transform: uppercase
|
||||
text-align: center
|
||||
line-height: 20px
|
||||
transform: rotate(45deg)
|
||||
-webkit-transform: rotate(45deg)
|
||||
width: 100px
|
||||
display: block
|
||||
box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1)
|
||||
position: absolute
|
||||
top: 19px
|
||||
right: -21px
|
||||
|
||||
&::before
|
||||
content: ""
|
||||
position: absolute
|
||||
left: 0px
|
||||
top: 100%
|
||||
z-index: -1
|
||||
|
||||
&::after
|
||||
content: ""
|
||||
position: absolute
|
||||
right: 0px
|
||||
top: 100%
|
||||
z-index: -1
|
||||
border-left: 3px solid transparent
|
||||
border-bottom: 3px solid transparent
|
||||
&.development
|
||||
+env-ribbon(#1e5799)
|
||||
&.production
|
||||
+env-ribbon(#808080)
|
||||
display: none
|
||||
&.test
|
||||
+env-ribbon(#66ff66)
|
||||
display: none
|
||||
&.staging
|
||||
+env-ribbon(#8F5408)
|
||||
@@ -0,0 +1,108 @@
|
||||
form
|
||||
input.datepicker
|
||||
width: 100px
|
||||
display: inline-block
|
||||
&.inline
|
||||
display: inline-block
|
||||
.form-actions
|
||||
[type="submit"]
|
||||
+button
|
||||
.workflow-step-assign-button
|
||||
+button($bg: $primary-color, $padding: $button-sml)
|
||||
margin-right: 8px
|
||||
.workflow-step-back-button
|
||||
+button($bg: $secondary-color, $padding: $button-sml)
|
||||
margin-right: 8px
|
||||
.workflow-step-process-button
|
||||
+button($bg: $primary-color, $padding: $button-sml)
|
||||
margin-right: 8px
|
||||
.workflow-step-overdue-button, .workflow-instance-archive-button, .workflow-instance-revive-button
|
||||
+button($bg: $warning-color, $padding: $button-sml)
|
||||
margin-right: 8px
|
||||
.workflow-step-complete-button
|
||||
+button($bg: $success-color, $padding: $button-sml)
|
||||
margin-right: 8px
|
||||
.workflow-step-reject-button, .workflow-instance-reset-button
|
||||
+button($bg: $alert-color, $padding: $button-sml)
|
||||
margin-right: 8px
|
||||
.form-inputs
|
||||
&.notes
|
||||
textarea
|
||||
min-height: 180px
|
||||
&.notes-to-append
|
||||
textarea
|
||||
min-height: 80px
|
||||
.field_with_hint
|
||||
textarea
|
||||
margin-bottom: 0
|
||||
.hint
|
||||
font-style: italic
|
||||
color: #777
|
||||
.notes-display
|
||||
@extend .panel
|
||||
height: 140px
|
||||
overflow-y: scroll
|
||||
.plan_date-placeholder
|
||||
color: #777
|
||||
font-size: 0.7em
|
||||
|
||||
// Add space to check_box collection list
|
||||
div.checkbox label input
|
||||
margin-right: 8px
|
||||
.plan_date-placeholder
|
||||
color: #777
|
||||
font-size: 0.7em
|
||||
|
||||
body
|
||||
label
|
||||
&.number
|
||||
display: inline-block
|
||||
padding: 4px 10px
|
||||
input
|
||||
&.number
|
||||
width: 60px
|
||||
display: inline-block
|
||||
.apply-filter
|
||||
+button($bg: $primary-color, $padding: $button-tny)
|
||||
.error
|
||||
input, textarea
|
||||
border-color: $alert-color
|
||||
input[type="number"]
|
||||
text-align: right
|
||||
|
||||
.form-row
|
||||
+grid-row
|
||||
.form-label
|
||||
@media #{$small-only}
|
||||
+grid-column($columns:10, $center:true)
|
||||
@media #{$medium-only}
|
||||
+grid-column($columns:4, $offset:1)
|
||||
@media #{$large-up}
|
||||
+grid-column(3)
|
||||
&.half
|
||||
+grid-column(6)
|
||||
.form-field
|
||||
@media #{$small-only}
|
||||
+grid-column($columns:10, $center:true, $last-column:true)
|
||||
@media #{$medium-only}
|
||||
+grid-column($columns:4, $last-column:false)
|
||||
@media #{$large-up}
|
||||
+grid-column($columns: 4, $last-column:false)
|
||||
&.full
|
||||
@media #{$small-only}
|
||||
+grid-column($columns:10, $center:true, $last-column:true)
|
||||
@media #{$medium-only}
|
||||
+grid-column($columns:7, $last-column:true)
|
||||
@media #{$large-up}
|
||||
+grid-column($columns: 9, $last-column:true)
|
||||
&.half
|
||||
+grid-column(6)
|
||||
.form-info
|
||||
@media #{$small-only}
|
||||
+grid-column($columns:10, $center:true)
|
||||
@media #{$medium-only}
|
||||
+grid-column($columns:4, $offset:1)
|
||||
@media #{$large-up}
|
||||
+grid-column(3)
|
||||
.error-message
|
||||
color: $alert-color
|
||||
@@ -0,0 +1,13 @@
|
||||
.edit-icon
|
||||
background-color: $warning-color
|
||||
color: white
|
||||
@extend .fa
|
||||
@extend .fa-pencil
|
||||
&.spacious
|
||||
padding: 0.25em
|
||||
h3
|
||||
.edit-icon
|
||||
@extend .fa-lg
|
||||
font-size: 0.8em
|
||||
padding: 5px
|
||||
vertical-align: middle
|
||||
@@ -0,0 +1,5 @@
|
||||
pre.log-entry-backtrace
|
||||
margin-top: 4px
|
||||
max-height: 222px
|
||||
overflow-y: scroll
|
||||
background-color: rgba(255,255,92, 0.2)
|
||||
@@ -0,0 +1,37 @@
|
||||
.optional-input, .optional-text-field
|
||||
&.active
|
||||
&.window_from, &.window_to, &.bucket, &.plan_date, &.window_date,
|
||||
&.service_window_request_date,
|
||||
&.service_window_number,
|
||||
&.exceedance_minutes,
|
||||
&.phone_number,
|
||||
&.number_of_visits,
|
||||
&.exceedance_couse_domain
|
||||
display: inline-block
|
||||
margin-left: 10px
|
||||
select
|
||||
width: 90px
|
||||
input
|
||||
width: 155px
|
||||
|
||||
&.workflow_instance_manager_id,
|
||||
&.workflow_instance_batch_id,
|
||||
&.customer_premise_equipment_id,
|
||||
&.customer_premise_equipment_number,
|
||||
&.new_xdf_service_id,
|
||||
&.customer_order_id,
|
||||
&.service_provider_phone_number
|
||||
display: inline-block
|
||||
margin-left: 10px
|
||||
select
|
||||
width: 272px
|
||||
input
|
||||
width: 272px
|
||||
//&.inactive
|
||||
//display: none
|
||||
|
||||
//TODO: should these rules be part of record_collection core?
|
||||
.optional-input-activator-container
|
||||
vertical-align: top
|
||||
.optional-input-activator-label
|
||||
display: inline-block
|
||||
@@ -0,0 +1,33 @@
|
||||
.page-actions, tfoot, .form-actions, .selection-container, .workflow-instance-batch-actions
|
||||
clear: left
|
||||
margin-top: 8px
|
||||
border-top: 1px solid #ddd
|
||||
padding-top: 8px
|
||||
.new
|
||||
+button
|
||||
.back
|
||||
+button($bg: $secondary-color)
|
||||
margin-right: 8px
|
||||
.collection-edit, .edit
|
||||
+button($bg: $warning-color)
|
||||
margin-right: 8px
|
||||
.destroy
|
||||
+button($bg: $alert-color)
|
||||
margin-right: 8px
|
||||
.workflow-step-back-button
|
||||
.workflow-step-assign-button
|
||||
.workflow-step-reset-button, .workflow-instance-reset-button
|
||||
+button($bg: $alert-color)
|
||||
.workflow-instance-archive-button, .workflow-instance-revive-button
|
||||
+button($bg: $warning-color)
|
||||
margin-right: 8px
|
||||
|
||||
.export-button
|
||||
+button($bg: $export-color)
|
||||
.show-workflow_instance_batch-workflow_instances
|
||||
+button
|
||||
margin-right: 8px
|
||||
.title-back-link
|
||||
@extend .fa
|
||||
@extend .fa-arrow-left
|
||||
margin-right: 8px
|
||||
@@ -0,0 +1,14 @@
|
||||
.role-icon
|
||||
@extend .fa
|
||||
&.checkmark
|
||||
@extend .fa-check
|
||||
&.read
|
||||
@extend .fa-book
|
||||
&.manage
|
||||
@extend .fa-pencil
|
||||
&.update
|
||||
@extend .fa-pencil
|
||||
&.download
|
||||
@extend .fa-download
|
||||
&.reset
|
||||
@extend .fa-undo
|
||||
@@ -0,0 +1,5 @@
|
||||
// Based on CU request from Kitty
|
||||
.select2-container
|
||||
.select2-results__option
|
||||
padding: 0 3px
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
.statistics-title
|
||||
font-size: 1.3em
|
||||
font-weight: bold
|
||||
border-bottom: 1px solid #999
|
||||
@@ -0,0 +1,3 @@
|
||||
.clearfix
|
||||
+clearfix
|
||||
clear: both
|
||||
@@ -0,0 +1,6 @@
|
||||
.subprocess-modal-button
|
||||
+button
|
||||
&.mark-complete
|
||||
+button($bg: $success-color)
|
||||
&.mark-reject
|
||||
+button($bg: $alert-color)
|
||||
@@ -0,0 +1,44 @@
|
||||
table
|
||||
&.full-width
|
||||
width: 100%
|
||||
.actions
|
||||
a
|
||||
display: inline-block
|
||||
margin-left: 10px
|
||||
&.column-filter
|
||||
white-space: nowrap
|
||||
.table-link
|
||||
&.show
|
||||
i
|
||||
@extend .fa, .fa-lg, .fa-folder-open
|
||||
&.edit
|
||||
color: $warning-color
|
||||
i
|
||||
@extend .fa, .fa-lg, .fa-edit
|
||||
&.destroy
|
||||
color: $alert-color
|
||||
i
|
||||
@extend .fa, .fa-lg, .fa-trash
|
||||
&.download
|
||||
color: $export-color
|
||||
i
|
||||
@extend .fa, .fa-lg, .fa-download
|
||||
.clear-filters-button
|
||||
+button($bg: $warning-color, $padding: $button-tny)
|
||||
margin: 0
|
||||
i
|
||||
font-family: FontAwesome
|
||||
.submit-filters-button
|
||||
+button($bg: $primary-color, $padding: $button-tny)
|
||||
margin: 0
|
||||
//-webkit-appearance: button
|
||||
font-family: FontAwesome
|
||||
//span
|
||||
@extend .fa, .fa-lg, .fa-filter
|
||||
tr.search
|
||||
.clear-filters-button
|
||||
display: none
|
||||
&.conditions-present
|
||||
background-color: #7af
|
||||
.clear-filters-button
|
||||
display: inline-block
|
||||
@@ -0,0 +1,70 @@
|
||||
/* Based on the bootstrap 3+ panel, of course under a different name.
|
||||
The conversion is done based on:
|
||||
http://stackoverflow.com/questions/19220027/can-you-use-panels-in-bootstrap-2-3
|
||||
.title-box
|
||||
padding: 15px
|
||||
margin-bottom: 20px
|
||||
background-color: #ffffff
|
||||
border: 1px solid #dddddd
|
||||
border-radius: 4px
|
||||
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05)
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05)
|
||||
|
||||
.title-box-heading
|
||||
padding: 10px 15px
|
||||
margin: -15px -15px 15px
|
||||
font-size: 17.5px
|
||||
font-weight: 500
|
||||
background-color: #f5f5f5
|
||||
border-bottom: 1px solid #dddddd
|
||||
border-top-right-radius: 3px
|
||||
border-top-left-radius: 3px
|
||||
|
||||
.title-box-footer
|
||||
padding: 10px 15px
|
||||
margin: 15px -15px -15px
|
||||
background-color: #f5f5f5
|
||||
border-top: 1px solid #dddddd
|
||||
border-bottom-right-radius: 3px
|
||||
border-bottom-left-radius: 3px
|
||||
|
||||
.title-box-primary
|
||||
border-color: #428bca
|
||||
.title-box-heading
|
||||
color: #ffffff
|
||||
background-color: #428bca
|
||||
border-color: #428bca
|
||||
|
||||
.title-box-success
|
||||
border-color: #d6e9c6
|
||||
|
||||
.title-box-heading
|
||||
color: #468847
|
||||
background-color: #dff0d8
|
||||
border-color: #d6e9c6
|
||||
|
||||
.title-box-warning
|
||||
border-color: #fbeed5
|
||||
|
||||
.title-box-heading
|
||||
color: #c09853
|
||||
background-color: #fcf8e3
|
||||
border-color: #fbeed5
|
||||
|
||||
.title-box-danger
|
||||
border-color: #eed3d7
|
||||
|
||||
.title-box-heading
|
||||
color: #b94a48
|
||||
background-color: #f2dede
|
||||
border-color: #eed3d7
|
||||
|
||||
.title-box-info
|
||||
border-color: #bce8f1
|
||||
|
||||
.title-box-heading
|
||||
color: #3a87ad
|
||||
background-color: #d9edf7
|
||||
border-color: #bce8f1
|
||||
|
||||
//State specific additions
|
||||
@@ -0,0 +1,11 @@
|
||||
table.roles
|
||||
td
|
||||
text-align: center
|
||||
|
||||
.user-roles-tables
|
||||
display: flex
|
||||
flex-direction: row
|
||||
flex-wrap: wrap
|
||||
align-items: flex-start
|
||||
justify-content: space-around
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
= env-ribbon($color)
|
||||
span
|
||||
@if lightness($color) > 50
|
||||
background: linear-gradient(darken($color, 15) 0%, $color 100%)
|
||||
color: black
|
||||
@else
|
||||
background: linear-gradient(lighten($color, 15) 0%, $color 100%)
|
||||
color: white
|
||||
&::before
|
||||
border-left: 3px solid $color
|
||||
border-top: 3px solid $color
|
||||
&::after
|
||||
border-right: 3px solid $color
|
||||
border-top: 3px solid $color
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
@import ./mixin_parts/*
|
||||
@@ -0,0 +1,9 @@
|
||||
#manual-container
|
||||
img
|
||||
background-color: white
|
||||
border: 1px solid #aaa
|
||||
padding: 5px
|
||||
margin: 4px
|
||||
h3
|
||||
font-weight: bold
|
||||
border-bottom: 1px solid #999
|
||||
@@ -0,0 +1,27 @@
|
||||
.show-workflow_instance_batch-workflow_instances
|
||||
span
|
||||
@extend .fa, .fa-lg, .fa-bars
|
||||
td.workflow_instance_batch-index-progress-container
|
||||
.workflow_instance_batch-index-workflow_step
|
||||
display: none
|
||||
|
||||
|
||||
.batch-states-collection-container
|
||||
+panel
|
||||
margin: 0
|
||||
padding: 8px 12px 5px 12px
|
||||
.workflow-instance-batch-actions
|
||||
.workflow-step-container
|
||||
padding-bottom: 5px
|
||||
h4
|
||||
margin-bottom: 0
|
||||
button
|
||||
padding: 5px
|
||||
margin-bottom: 4px
|
||||
.text
|
||||
display: none
|
||||
.icon
|
||||
@extend .fa
|
||||
@extend .fa-lg
|
||||
@extend .fa-pencil
|
||||
border-bottom: 1px solid #aaa
|
||||
@@ -0,0 +1,37 @@
|
||||
.selection-container
|
||||
#workflow-instance-selection-input-submit
|
||||
+button
|
||||
.workflow-instance-workflow-steps-container
|
||||
display: flex
|
||||
flex-direction: row
|
||||
flex-wrap: wrap
|
||||
align-items: flex-start
|
||||
justify-content: space-around
|
||||
|
||||
.workflow-instance-workflow-step-container
|
||||
@extend .title-box
|
||||
//float: left
|
||||
width: 444px
|
||||
.workflow-instance-workflow-step-title
|
||||
@extend .title-box-heading
|
||||
.workflow-instance-workflow-step-body
|
||||
.display-row
|
||||
&.attribute-notes
|
||||
display: none
|
||||
.display-label
|
||||
width: 65%
|
||||
.display-field
|
||||
width: 35%
|
||||
.page-actions
|
||||
//display: none
|
||||
text-align: center
|
||||
.collection-edit
|
||||
margin: 0
|
||||
padding: 5px 12px
|
||||
&.processing
|
||||
@extend .title-box-primary
|
||||
&.rejected
|
||||
@extend .title-box-danger
|
||||
&.completed
|
||||
@extend .title-box-success
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
.workflow-step-workfow-instances-collection-container
|
||||
+panel
|
||||
padding: 10px
|
||||
margin-bottom: 10px
|
||||
.pending, .unplanned, .planned
|
||||
color: #555
|
||||
.processing
|
||||
color: $primary-color
|
||||
.rejected, .any_rejected
|
||||
color: $alert-color
|
||||
.completed, .all_completed
|
||||
color: $success-color
|
||||
h2
|
||||
.workflow-step-actions
|
||||
margin: 0
|
||||
@@ -0,0 +1,7 @@
|
||||
//= require pickadate/default
|
||||
//= require pickadate/default.date
|
||||
//= require pickadate/default.time
|
||||
//= require record_collection/all
|
||||
|
||||
$export-color: #626
|
||||
@import ./mixins
|
||||
Reference in New Issue
Block a user