diff --git a/app/assets/javascripts/app/controllers/_ui_element/business_hours.js.coffee b/app/assets/javascripts/app/controllers/_ui_element/business_hours.js.coffee new file mode 100644 index 000000000..5f25812d6 --- /dev/null +++ b/app/assets/javascripts/app/controllers/_ui_element/business_hours.js.coffee @@ -0,0 +1,39 @@ +class App.UiElement.business_hours + @render: (attribute, params) -> + + hours = { + mon: { + active: true + timeframes: ['09:00-17:00'] + } + tue: { + active: true + timeframes: ['00:00-24:00'] + } + wed: { + active: true + timeframes: ['09:00-17:00'] + } + thu: { + active: true + timeframes: ['09:00-12:00', '13:00-17:00'] + } + fri: { + active: true + timeframes: ['09:00-17:00'] + } + sat: { + active: false + timeframes: ['10:00-14:00'] + } + sun: { + active: false + timeframes: ['10:00-14:00'] + } + } + + businessHours = new App.BusinessHours + hours: hours + + businessHours.render() + businessHours.el \ No newline at end of file diff --git a/app/assets/javascripts/app/controllers/_ui_element/holiday_selector.js.coffee b/app/assets/javascripts/app/controllers/_ui_element/holiday_selector.js.coffee new file mode 100644 index 000000000..061674eb9 --- /dev/null +++ b/app/assets/javascripts/app/controllers/_ui_element/holiday_selector.js.coffee @@ -0,0 +1,12 @@ +class App.UiElement.holiday_selector + @render: (attribute, params) -> + console.log('aa', attribute) + days = {} + if attribute.value + days = attribute.value + days_sorted = _.keys(days).sort() + days_new = {} + for day in days_sorted + days_new[day] = days[day] + + item = $( App.view('calendar/holiday_selector')( attribute: attribute, days: days_new ) ) \ No newline at end of file diff --git a/app/assets/javascripts/app/controllers/_ui_element/ical_feed.js.coffee b/app/assets/javascripts/app/controllers/_ui_element/ical_feed.js.coffee new file mode 100644 index 000000000..dbb16fe80 --- /dev/null +++ b/app/assets/javascripts/app/controllers/_ui_element/ical_feed.js.coffee @@ -0,0 +1,35 @@ +class App.UiElement.ical_feed extends App.UiElement.ApplicationUiElement + @render: (attribute, params) -> + console.log('A', attribute) + item = $( '
<%- @T('Active') %> + | <%- @T('Date') %> + | <%- @T('Description') %> + | <%- @T('Action') %> + |
---|---|---|---|
+ + | <%- @Tdate(day) %> + | <%= meta.summary %> + |
+
+
+ <% end %>
+
+ <%- @Icon('trash') %> <%- @T('Remove') %>
+
+ |
+ + | <%- @Tdate('2015-12-25') %> + | Some Description + |
+
+
+
+ <%- @Icon('trash') %> <%- @T('Remove') %>
+
+ |
+ + | <%- @Tdate('2015-12-26') %> + | Some Description + |
+
+
+
+ <%- @Icon('trash') %> <%- @T('Remove') %>
+
+ |
+ | + + + | + + |
+
+ <%- @Icon('plus-small') %> <%- @T('Add') %>
+
+ |
<%- @T('Active') %> - | <%- @T('Date') %> - | <%- @T('Description') %> - | <%- @T('Action') %> - |
---|---|---|---|
- - | <%- @Tdate('2015-12-24') %> - | Some Description - |
-
-
-
- <%- @Icon('trash') %> <%- @T('Remove') %>
-
- |
- - | <%- @Tdate('2015-12-25') %> - | Some Description - |
-
-
-
- <%- @Icon('trash') %> <%- @T('Remove') %>
-
- |
- - | <%- @Tdate('2015-12-26') %> - | Some Description - |
-
-
-
- <%- @Icon('trash') %> <%- @T('Remove') %>
-
- |
- | - - - | - - |
-
- <%- @Icon('plus-small') %> Add Date
-
- |