outpost-cms 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/MIT-LICENSE +20 -0
- data/README.md +295 -0
- data/Rakefile +26 -0
- data/app/assets/images/glyphicons-halflings-red.png +0 -0
- data/app/assets/javascripts/outpost/application.js +1 -0
- data/app/assets/javascripts/outpost/auto_slug_field.js.coffee +53 -0
- data/app/assets/javascripts/outpost/base.js.coffee +1 -0
- data/app/assets/javascripts/outpost/date_time_input.js.coffee +108 -0
- data/app/assets/javascripts/outpost/field_counter.js.coffee +93 -0
- data/app/assets/javascripts/outpost/field_manager.js.coffee +37 -0
- data/app/assets/javascripts/outpost/global_plugins.js.coffee +87 -0
- data/app/assets/javascripts/outpost/index_manager.js.coffee +88 -0
- data/app/assets/javascripts/outpost/notification.js.coffee +46 -0
- data/app/assets/javascripts/outpost/preview.js.coffee +60 -0
- data/app/assets/javascripts/outpost/templates/date_field.jst.eco +3 -0
- data/app/assets/javascripts/outpost/templates/loading.jst.eco +11 -0
- data/app/assets/javascripts/outpost/templates/slug_generate_button.jst.eco +1 -0
- data/app/assets/javascripts/outpost/templates/time_field.jst.eco +3 -0
- data/app/assets/javascripts/outpost/templates.js +1 -0
- data/app/assets/javascripts/outpost.js +32 -0
- data/app/assets/stylesheets/outpost/_base.css.scss +127 -0
- data/app/assets/stylesheets/outpost/_edit.css.scss +13 -0
- data/app/assets/stylesheets/outpost/_forms.css.scss +116 -0
- data/app/assets/stylesheets/outpost/_index.css.scss +68 -0
- data/app/assets/stylesheets/outpost/_utility.css.scss +16 -0
- data/app/assets/stylesheets/outpost/application.css.scss +1 -0
- data/app/assets/stylesheets/outpost/bootstrap/bootstrap.css.scss +49 -0
- data/app/assets/stylesheets/outpost/bootstrap/datepicker.css.scss +301 -0
- data/app/assets/stylesheets/outpost.css.scss +14 -0
- data/app/controllers/outpost/application_controller.rb +40 -0
- data/app/controllers/outpost/base_controller.rb +3 -0
- data/app/controllers/outpost/errors_controller.rb +9 -0
- data/app/controllers/outpost/home_controller.rb +2 -0
- data/app/controllers/outpost/resource_controller.rb +12 -0
- data/app/controllers/outpost/sessions_controller.rb +36 -0
- data/app/helpers/authorization_helper.rb +44 -0
- data/app/helpers/list_helper.rb +243 -0
- data/app/helpers/outpost_helper.rb +49 -0
- data/app/helpers/render_helper.rb +41 -0
- data/app/helpers/utility_helper.rb +136 -0
- data/app/inputs/date_time_input.rb +12 -0
- data/app/models/permission.rb +18 -0
- data/app/models/user_permission.rb +4 -0
- data/app/views/kaminari/bootstrap/_first_page.html.erb +3 -0
- data/app/views/kaminari/bootstrap/_gap.html.erb +3 -0
- data/app/views/kaminari/bootstrap/_last_page.html.erb +3 -0
- data/app/views/kaminari/bootstrap/_next_page.html.erb +3 -0
- data/app/views/kaminari/bootstrap/_page.html.erb +3 -0
- data/app/views/kaminari/bootstrap/_paginator.html.erb +17 -0
- data/app/views/kaminari/bootstrap/_prev_page.html.erb +3 -0
- data/app/views/layouts/outpost/application.html.erb +101 -0
- data/app/views/layouts/outpost/minimal.html.erb +26 -0
- data/app/views/outpost/errors/error_404.html.erb +1 -0
- data/app/views/outpost/errors/error_500.html.erb +8 -0
- data/app/views/outpost/home/dashboard.html.erb +1 -0
- data/app/views/outpost/resource/_errors.html.erb +11 -0
- data/app/views/outpost/resource/_extra_fields.html.erb +1 -0
- data/app/views/outpost/resource/_form_fields.html.erb +9 -0
- data/app/views/outpost/resource/edit.html.erb +44 -0
- data/app/views/outpost/resource/index.html.erb +22 -0
- data/app/views/outpost/resource/new.html.erb +21 -0
- data/app/views/outpost/resource/search.html.erb +1 -0
- data/app/views/outpost/resource/show.html.erb +1 -0
- data/app/views/outpost/sessions/new.html.erb +16 -0
- data/app/views/outpost/shared/_add_link.html.erb +1 -0
- data/app/views/outpost/shared/_breadcrumbs.html.erb +15 -0
- data/app/views/outpost/shared/_cancel_link.html.erb +1 -0
- data/app/views/outpost/shared/_columns.html.erb +5 -0
- data/app/views/outpost/shared/_filters.html.erb +16 -0
- data/app/views/outpost/shared/_flash_messages.html.erb +6 -0
- data/app/views/outpost/shared/_form_block.html.erb +18 -0
- data/app/views/outpost/shared/_form_nav.html.erb +12 -0
- data/app/views/outpost/shared/_headers.html.erb +16 -0
- data/app/views/outpost/shared/_index_header.html.erb +4 -0
- data/app/views/outpost/shared/_list_table.html.erb +7 -0
- data/app/views/outpost/shared/_modal.html.erb +16 -0
- data/app/views/outpost/shared/_navigation.html.erb +31 -0
- data/app/views/outpost/shared/_notice.html.erb +1 -0
- data/app/views/outpost/shared/_pagination.html.erb +2 -0
- data/app/views/outpost/shared/_preview_errors.html.erb +9 -0
- data/app/views/outpost/shared/_submit_row.html.erb +50 -0
- data/config/routes.rb +4 -0
- data/lib/action_view/helpers/form_builder.rb +71 -0
- data/lib/outpost/breadcrumbs.rb +73 -0
- data/lib/outpost/config.rb +63 -0
- data/lib/outpost/controller/actions.rb +72 -0
- data/lib/outpost/controller/authentication.rb +34 -0
- data/lib/outpost/controller/authorization.rb +28 -0
- data/lib/outpost/controller/callbacks.rb +14 -0
- data/lib/outpost/controller/custom_errors.rb +41 -0
- data/lib/outpost/controller/filtering.rb +22 -0
- data/lib/outpost/controller/helpers.rb +52 -0
- data/lib/outpost/controller/ordering.rb +46 -0
- data/lib/outpost/controller/preferences.rb +71 -0
- data/lib/outpost/controller.rb +123 -0
- data/lib/outpost/engine.rb +10 -0
- data/lib/outpost/helpers/naming.rb +22 -0
- data/lib/outpost/helpers.rb +6 -0
- data/lib/outpost/hook.rb +35 -0
- data/lib/outpost/list/base.rb +78 -0
- data/lib/outpost/list/column.rb +24 -0
- data/lib/outpost/list/filter.rb +37 -0
- data/lib/outpost/list.rb +15 -0
- data/lib/outpost/model/authentication.rb +34 -0
- data/lib/outpost/model/authorization.rb +32 -0
- data/lib/outpost/model/identifier.rb +39 -0
- data/lib/outpost/model/methods.rb +23 -0
- data/lib/outpost/model/naming.rb +63 -0
- data/lib/outpost/model/routing.rb +138 -0
- data/lib/outpost/model/serializer.rb +27 -0
- data/lib/outpost/model.rb +22 -0
- data/lib/outpost/test.rb +21 -0
- data/lib/outpost/version.rb +3 -0
- data/lib/outpost-cms.rb +2 -0
- data/lib/outpost.rb +80 -0
- data/lib/tasks/outpost_tasks.rake +7 -0
- data/spec/controllers/authentication_spec.rb +62 -0
- data/spec/controllers/sessions_controller_spec.rb +99 -0
- data/spec/factories.rb +31 -0
- data/spec/helpers/authorization_helper_spec.rb +47 -0
- data/spec/helpers/list_helper_spec.rb +74 -0
- data/spec/helpers/outpost_helper_spec.rb +5 -0
- data/spec/helpers/render_helper_spec.rb +19 -0
- data/spec/helpers/utility_helper_spec.rb +53 -0
- data/spec/internal/app/controllers/application_controller.rb +3 -0
- data/spec/internal/app/controllers/outpost/people_controller.rb +23 -0
- data/spec/internal/app/controllers/outpost/pidgeons_controller.rb +5 -0
- data/spec/internal/app/controllers/people_controller.rb +9 -0
- data/spec/internal/app/controllers/pidgeons_controller.rb +3 -0
- data/spec/internal/app/models/person.rb +10 -0
- data/spec/internal/app/models/pidgeon.rb +3 -0
- data/spec/internal/app/models/post.rb +4 -0
- data/spec/internal/app/models/user.rb +4 -0
- data/spec/internal/app/views/people/index.html.erb +7 -0
- data/spec/internal/app/views/people/show.html.erb +1 -0
- data/spec/internal/config/database.yml +3 -0
- data/spec/internal/config/initializers/configuration.rb +3 -0
- data/spec/internal/config/initializers/outpost.rb +6 -0
- data/spec/internal/config/routes.rb +16 -0
- data/spec/internal/db/combustion_test.sqlite +0 -0
- data/spec/internal/db/schema.rb +44 -0
- data/spec/internal/db/seeds.rb +14 -0
- data/spec/internal/log/test.log +59277 -0
- data/spec/internal/public/favicon.ico +0 -0
- data/spec/lib/breadcrumbs_spec.rb +54 -0
- data/spec/lib/config_spec.rb +76 -0
- data/spec/lib/controller/actions_spec.rb +5 -0
- data/spec/lib/controller/authorization_spec.rb +4 -0
- data/spec/lib/controller/callbacks_spec.rb +31 -0
- data/spec/lib/controller/helpers_spec.rb +33 -0
- data/spec/lib/controller_spec.rb +25 -0
- data/spec/lib/helpers/naming_spec.rb +10 -0
- data/spec/lib/hook_spec.rb +13 -0
- data/spec/lib/list/base_spec.rb +96 -0
- data/spec/lib/list/column_spec.rb +46 -0
- data/spec/lib/list/filter_spec.rb +44 -0
- data/spec/lib/model/authentication_spec.rb +29 -0
- data/spec/lib/model/authorization_spec.rb +66 -0
- data/spec/lib/model/identifier_spec.rb +51 -0
- data/spec/lib/model/methods_spec.rb +8 -0
- data/spec/lib/model/naming_spec.rb +55 -0
- data/spec/lib/model/routing_spec.rb +166 -0
- data/spec/lib/model/serializer_spec.rb +13 -0
- data/spec/lib/outpost_spec.rb +34 -0
- data/spec/models/permission_spec.rb +10 -0
- data/spec/models/user_permission_spec.rb +4 -0
- data/spec/spec_helper.rb +22 -0
- metadata +411 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Bootstrap things
|
|
2
|
+
|
|
3
|
+
# Scrollspy has to be initiated here,
|
|
4
|
+
# instead of via data- attributes,
|
|
5
|
+
# otherwise it's buggy. I don't know why.
|
|
6
|
+
offset = 160
|
|
7
|
+
nav = "#form-nav"
|
|
8
|
+
|
|
9
|
+
$ ->
|
|
10
|
+
# Prevent firefox from submitting a form when the "Enter"
|
|
11
|
+
# key is pressed inside of a text field...
|
|
12
|
+
$("form input[type=text]").on
|
|
13
|
+
keydown: (event) ->
|
|
14
|
+
key = event.keyCode || event.which
|
|
15
|
+
|
|
16
|
+
if key == 13 # Enter
|
|
17
|
+
event.stopPropagation()
|
|
18
|
+
event.preventDefault()
|
|
19
|
+
false
|
|
20
|
+
|
|
21
|
+
# Select2
|
|
22
|
+
# Set a blank placeholder for all selects.
|
|
23
|
+
# Also allow clearing for any option.
|
|
24
|
+
# If you don't want the "clear" option on a certain select element,
|
|
25
|
+
# add the `include_blank: false` option to the rails
|
|
26
|
+
# helper.
|
|
27
|
+
#
|
|
28
|
+
# Note: This also gets called in field_manager.
|
|
29
|
+
# TODO: Make it so we don't have to call it twice.
|
|
30
|
+
$("select").not('[data-disable-select2="true"]').select2
|
|
31
|
+
placeholder: " "
|
|
32
|
+
allowClear: true
|
|
33
|
+
|
|
34
|
+
# Tooltip
|
|
35
|
+
$('[rel="tooltip"]').tooltip()
|
|
36
|
+
|
|
37
|
+
# Affix
|
|
38
|
+
# Fix the width for all of these elements
|
|
39
|
+
$('[data-spy="affix"]').each ->
|
|
40
|
+
$(@).width $(@).width()
|
|
41
|
+
|
|
42
|
+
# For table headers, we want them to act cool so we have
|
|
43
|
+
# to treat them special. First fix the widths of the "th"
|
|
44
|
+
# elements. Then make the top margin of the table the
|
|
45
|
+
# same as the height of the header. Then move the header
|
|
46
|
+
# up its height in pixels to give the appearance of
|
|
47
|
+
# sitting on top.
|
|
48
|
+
$('table.index-list thead').each ->
|
|
49
|
+
$(@).width $(@).width()
|
|
50
|
+
|
|
51
|
+
$('th', @).each -> $(@).width $(@).width()
|
|
52
|
+
height = $(@).height()
|
|
53
|
+
$(@).closest("table").css("margin-top": height)
|
|
54
|
+
|
|
55
|
+
$(@).addClass("ready")
|
|
56
|
+
$(@).css("top": -height)
|
|
57
|
+
|
|
58
|
+
$('table.index-list thead').affix
|
|
59
|
+
offset: 65
|
|
60
|
+
|
|
61
|
+
# Scrollspy
|
|
62
|
+
$spy = $("body").scrollspy
|
|
63
|
+
target: nav
|
|
64
|
+
offset: offset
|
|
65
|
+
|
|
66
|
+
# Since we have some fixed elements at the
|
|
67
|
+
# top of the screen, we have to offset the
|
|
68
|
+
# anchors when they're clicked in the form
|
|
69
|
+
# nav.
|
|
70
|
+
$("#{nav} li a").on
|
|
71
|
+
click: (event) ->
|
|
72
|
+
event.preventDefault()
|
|
73
|
+
href = $(@).attr('href')
|
|
74
|
+
window.location.hash = href
|
|
75
|
+
$(href)[0].scrollIntoView()
|
|
76
|
+
window.scrollBy(0, -offset + 80)
|
|
77
|
+
false
|
|
78
|
+
|
|
79
|
+
# Make highlighted TH's clickable
|
|
80
|
+
# TODO Move this into a better place
|
|
81
|
+
$("th.header-highlighted, th.header-sortable").each ->
|
|
82
|
+
if href = $(".js-sort-link", @).attr("href")
|
|
83
|
+
$(@).addClass("clickable")
|
|
84
|
+
$(@).on click: (event) ->
|
|
85
|
+
window.location = href
|
|
86
|
+
|
|
87
|
+
true
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
##
|
|
2
|
+
# IndexManager
|
|
3
|
+
#
|
|
4
|
+
# Load up special things in the index pages.
|
|
5
|
+
#
|
|
6
|
+
class outpost.IndexManager
|
|
7
|
+
DefaultOptions:
|
|
8
|
+
cellFinder: "*[data-updatable='true']"
|
|
9
|
+
|
|
10
|
+
constructor: (@baseUrl, options={}) ->
|
|
11
|
+
@options = _.defaults options, @DefaultOptions
|
|
12
|
+
|
|
13
|
+
for cell in $(@options.cellFinder)
|
|
14
|
+
new outpost.QuickEditCell $(cell), @baseUrl
|
|
15
|
+
|
|
16
|
+
##
|
|
17
|
+
# QuickEditCell
|
|
18
|
+
#
|
|
19
|
+
# Adds the ability to quick-edit any attribute from the index page.
|
|
20
|
+
# Looks for fields with 'data-updatable="true"'
|
|
21
|
+
#
|
|
22
|
+
class outpost.QuickEditCell
|
|
23
|
+
defaults:
|
|
24
|
+
formTemplate: JST["outpost/templates/data_field"]
|
|
25
|
+
attribute: "data-attribute"
|
|
26
|
+
id: "data-id"
|
|
27
|
+
highlightColor: "#dff0d8"
|
|
28
|
+
highlightTime: 2000
|
|
29
|
+
|
|
30
|
+
constructor: (@el, baseUrl, options={}) ->
|
|
31
|
+
@options = _.defaults options, @defaults
|
|
32
|
+
|
|
33
|
+
# Check values
|
|
34
|
+
@value = null
|
|
35
|
+
@keyup = false
|
|
36
|
+
|
|
37
|
+
# Attributes
|
|
38
|
+
@attribute = @el.attr(@options.attribute)
|
|
39
|
+
@id = @el.attr(@options.id)
|
|
40
|
+
@url = "#{baseUrl}/#{@id}"
|
|
41
|
+
|
|
42
|
+
@ajaxOptions =
|
|
43
|
+
dataType: 'json'
|
|
44
|
+
url: @url
|
|
45
|
+
|
|
46
|
+
@el.on
|
|
47
|
+
click: (event) => @buildForm()
|
|
48
|
+
|
|
49
|
+
@el.on
|
|
50
|
+
keyup: (event) =>
|
|
51
|
+
if event.keyCode == 13
|
|
52
|
+
@keyup = true
|
|
53
|
+
@updateData(event)
|
|
54
|
+
blur: (event) =>
|
|
55
|
+
if not @keyup
|
|
56
|
+
@updateData(event)
|
|
57
|
+
, 'input'
|
|
58
|
+
|
|
59
|
+
#-------------
|
|
60
|
+
|
|
61
|
+
buildForm: (event) ->
|
|
62
|
+
$.ajax _.extend @ajaxOptions,
|
|
63
|
+
type: "GET"
|
|
64
|
+
success: (data, status, xhr) =>
|
|
65
|
+
@value = data[@attribute]
|
|
66
|
+
@el.html(@options.formTemplate attribute: @attribute, id: @id, inputValue: @value)
|
|
67
|
+
@el.find("input").focus()
|
|
68
|
+
|
|
69
|
+
#-------------
|
|
70
|
+
|
|
71
|
+
updateData: (event) ->
|
|
72
|
+
input = $(event.target)
|
|
73
|
+
value = input.val()
|
|
74
|
+
|
|
75
|
+
if value is @value
|
|
76
|
+
@el.html(value)
|
|
77
|
+
@keyup = false
|
|
78
|
+
return
|
|
79
|
+
|
|
80
|
+
$.ajax _.extend @ajaxOptions,
|
|
81
|
+
type: "PUT"
|
|
82
|
+
data:
|
|
83
|
+
data_point:
|
|
84
|
+
data_value: value
|
|
85
|
+
success: (data, status, xhr) =>
|
|
86
|
+
@el.html(value)
|
|
87
|
+
@el.effect "highlight", { color: @options.highlightColor }, @options.highlightTime
|
|
88
|
+
@keyup = false
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Notification
|
|
3
|
+
# Raise notifications from anywhere in the JS code
|
|
4
|
+
# Pass the $(el) to place the message into
|
|
5
|
+
#
|
|
6
|
+
class outpost.Notification
|
|
7
|
+
constructor: (@wrapper, @type, @message) ->
|
|
8
|
+
@el = $("<div />", class: "alert alert-#{type}").html("#{message}")
|
|
9
|
+
|
|
10
|
+
render: ->
|
|
11
|
+
@wrapper.append @el
|
|
12
|
+
|
|
13
|
+
prepend: ->
|
|
14
|
+
@wrapper.prepend @el
|
|
15
|
+
|
|
16
|
+
# Replaces the wrapper's content with the alert
|
|
17
|
+
replace: ->
|
|
18
|
+
@wrapper.html @el
|
|
19
|
+
|
|
20
|
+
# Delegation for jQuery: @el.is(":visible")
|
|
21
|
+
isVisible: ->
|
|
22
|
+
@el.is(":visible")
|
|
23
|
+
|
|
24
|
+
# Delegation for jQuery: @el.show()
|
|
25
|
+
show: ->
|
|
26
|
+
@el.show()
|
|
27
|
+
|
|
28
|
+
# Delegation for jQuery: @el.hide()
|
|
29
|
+
hide: ->
|
|
30
|
+
@el.hide()
|
|
31
|
+
|
|
32
|
+
# Delegation for jQuery: @el.fadeIn()
|
|
33
|
+
fadeIn: (speed=400, callback=null) ->
|
|
34
|
+
@el.fadeIn(speed, callback?())
|
|
35
|
+
|
|
36
|
+
# Delegation for jQuery: @el.fadeOut()
|
|
37
|
+
fadeOut: (speed=400, callback=null) ->
|
|
38
|
+
@el.fadeOut(speed, callback?())
|
|
39
|
+
|
|
40
|
+
# Delegation for jQuery: @el.detach()
|
|
41
|
+
detach: ->
|
|
42
|
+
@el.detach()
|
|
43
|
+
|
|
44
|
+
# Delegation for jQuery: @el.remove()
|
|
45
|
+
remove: ->
|
|
46
|
+
@el.remove()
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
##
|
|
2
|
+
# Preview
|
|
3
|
+
#
|
|
4
|
+
# Preview functionality for the CMS
|
|
5
|
+
#
|
|
6
|
+
class outpost.Preview
|
|
7
|
+
constructor: (@options) ->
|
|
8
|
+
_t = @
|
|
9
|
+
|
|
10
|
+
$("form #preview-submit a.js-preview-btn").on
|
|
11
|
+
click: (event) ->
|
|
12
|
+
event.preventDefault()
|
|
13
|
+
target = $(@)
|
|
14
|
+
form = target.closest("form")
|
|
15
|
+
|
|
16
|
+
# Update any hidden textareas that are using CKEditor
|
|
17
|
+
# Then serialize the form.
|
|
18
|
+
if CKEDITOR?
|
|
19
|
+
for id,instance of CKEDITOR.instances
|
|
20
|
+
instance.updateElement()
|
|
21
|
+
|
|
22
|
+
data = form.serialize()
|
|
23
|
+
|
|
24
|
+
$.ajax
|
|
25
|
+
type: 'POST'
|
|
26
|
+
dataType: "html"
|
|
27
|
+
url: "#{_t.options.baseUrl}/preview"
|
|
28
|
+
data:
|
|
29
|
+
data
|
|
30
|
+
|
|
31
|
+
beforeSend: (jqXHR, settings) ->
|
|
32
|
+
_t.openWindow(target.data("windowOptions"))
|
|
33
|
+
_t.writeToWindow(JST['outpost/templates/loading']())
|
|
34
|
+
|
|
35
|
+
statusCode:
|
|
36
|
+
200: (data, textStatus, jqXHR) ->
|
|
37
|
+
_t.writeToWindow(data)
|
|
38
|
+
404: (jqXHR, textStatus, errorThrown) ->
|
|
39
|
+
_t.writeToWindow("Error: #{errorThrown}")
|
|
40
|
+
500: (jqXHR, textStatus, errorThrown) ->
|
|
41
|
+
_t.writeToWindow("Error: #{errorThrown}")
|
|
42
|
+
false
|
|
43
|
+
|
|
44
|
+
#--------------------
|
|
45
|
+
# Open the preview window.
|
|
46
|
+
# If it doesn't exist yet, create it.
|
|
47
|
+
# If it already exists, just focus on it.
|
|
48
|
+
openWindow: (options="")->
|
|
49
|
+
if !@window or (@window and @window.closed)
|
|
50
|
+
@window = window.open("", "preview",
|
|
51
|
+
"scrollbars=yes,menubar=no,location=no,directories=no,toolbar=no,#{options}")
|
|
52
|
+
else
|
|
53
|
+
@window.focus()
|
|
54
|
+
|
|
55
|
+
#--------------------
|
|
56
|
+
# Write some data to the preview window.
|
|
57
|
+
# This shouldn't get called before @window is set.
|
|
58
|
+
writeToWindow: (data) ->
|
|
59
|
+
@window.document.write(data)
|
|
60
|
+
@window.document.close()
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>Loading...</title>
|
|
5
|
+
<script type="text/javascript" src="/assets/outpost/application.js"></script>
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<div id='spinner' style="width:100%;height:200px;"></div>
|
|
9
|
+
<script>$('#spinner').spin()</script>
|
|
10
|
+
</body>
|
|
11
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<a class="btn" href="#" style="display: inline-block; margin-left: 5px;">Generate</button>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//= require_tree ./templates
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//= require jquery
|
|
2
|
+
//= require underscore
|
|
3
|
+
//= require backbone
|
|
4
|
+
//= require moment
|
|
5
|
+
//= require jquery_ujs
|
|
6
|
+
//= require spin
|
|
7
|
+
|
|
8
|
+
//= require jquery-ui-1.10.0.custom.min
|
|
9
|
+
//= require date.min
|
|
10
|
+
//= require select2
|
|
11
|
+
|
|
12
|
+
//= require bootstrap-transition
|
|
13
|
+
//= require bootstrap-dropdown
|
|
14
|
+
//= require bootstrap-modal
|
|
15
|
+
//= require bootstrap-tab
|
|
16
|
+
//= require bootstrap-scrollspy
|
|
17
|
+
//= require bootstrap-alert
|
|
18
|
+
//= require bootstrap-affix
|
|
19
|
+
//= require bootstrap-tooltip
|
|
20
|
+
//= require bootstrap-datepicker
|
|
21
|
+
|
|
22
|
+
//= require outpost/base
|
|
23
|
+
//= require outpost/templates
|
|
24
|
+
|
|
25
|
+
//= require outpost/notification
|
|
26
|
+
//= require outpost/field_manager
|
|
27
|
+
//= require outpost/date_time_input
|
|
28
|
+
//= require outpost/auto_slug_field
|
|
29
|
+
//= require outpost/field_counter
|
|
30
|
+
//= require outpost/preview
|
|
31
|
+
//= require outpost/index_manager
|
|
32
|
+
//= require outpost/global_plugins
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// Core ext.
|
|
2
|
+
body {
|
|
3
|
+
// Allow space for the submit-row
|
|
4
|
+
padding-bottom: 120px;
|
|
5
|
+
padding-top: 100px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
body, p {
|
|
9
|
+
line-height: 14px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
small {
|
|
13
|
+
font-size: 11px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.breadcrumb {
|
|
17
|
+
&.unstyled {
|
|
18
|
+
padding: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
padding-left: 0;
|
|
22
|
+
padding-right: 0;
|
|
23
|
+
margin: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Override a bug in bootstrap
|
|
27
|
+
.dropup .btn-large .caret {
|
|
28
|
+
border-bottom-color: $white;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.alert .close {
|
|
32
|
+
line-height: 12px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.icon-red {
|
|
36
|
+
background-image: image-url($iconRedSpritePath);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/////////////////////////////////
|
|
40
|
+
|
|
41
|
+
.cms-nav {
|
|
42
|
+
max-width: 820px;
|
|
43
|
+
|
|
44
|
+
.grouper {
|
|
45
|
+
display: inline-block;
|
|
46
|
+
width: 400px;
|
|
47
|
+
vertical-align: top;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
li {
|
|
51
|
+
clear: both;
|
|
52
|
+
border-bottom: 1px solid $grayLighter;
|
|
53
|
+
|
|
54
|
+
&:hover {
|
|
55
|
+
background: $linkColor;
|
|
56
|
+
&> a {
|
|
57
|
+
color: $white;
|
|
58
|
+
text-decoration: none;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&> a {
|
|
63
|
+
clear: none;
|
|
64
|
+
width: 285px;
|
|
65
|
+
display: inline-block;
|
|
66
|
+
|
|
67
|
+
// Everything below is copied from Bootstrap .dropdown-menu > li > a
|
|
68
|
+
// It has to be this way because of the .grouper div
|
|
69
|
+
// This should be fixed.
|
|
70
|
+
padding: 3px 20px;
|
|
71
|
+
font-weight: normal;
|
|
72
|
+
line-height: 20px;
|
|
73
|
+
color: #333333;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.btn-links {
|
|
78
|
+
display: inline-block;
|
|
79
|
+
clear: both;
|
|
80
|
+
vertical-align: bottom;
|
|
81
|
+
margin-bottom: 3px;
|
|
82
|
+
width: 60px;
|
|
83
|
+
|
|
84
|
+
&> a {
|
|
85
|
+
margin: 0px 2px;
|
|
86
|
+
&.add { float: right; }
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.fixed-breadcrumbs {
|
|
93
|
+
z-index: 5;
|
|
94
|
+
top: $navOffset;
|
|
95
|
+
@include box-shadow(0 2px 6px rgba(0,0,0,.2));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.help-block {
|
|
99
|
+
color: $grayLight;
|
|
100
|
+
font-style: italic;
|
|
101
|
+
font-size: 12px;
|
|
102
|
+
margin-top: 10px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.list-status {
|
|
106
|
+
text-align: center;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.add-on.populate {
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Style the dropdown buttons so they look like links
|
|
114
|
+
ul.dropdown-menu li button {
|
|
115
|
+
border: none;
|
|
116
|
+
background: none;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
width: 100%;
|
|
119
|
+
text-align: left;
|
|
120
|
+
&:hover {
|
|
121
|
+
background: $grayLighter;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
#fixed-sidebar.affix {
|
|
126
|
+
top: $navOffset + $breadcrumbOffset + 4px;
|
|
127
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Styles for Editing/New pages
|
|
2
|
+
|
|
3
|
+
.submit-row:last-of-type {
|
|
4
|
+
position: fixed;
|
|
5
|
+
bottom: 0px;
|
|
6
|
+
left: 0px;
|
|
7
|
+
right: 0px;
|
|
8
|
+
margin: 0px;
|
|
9
|
+
background: $grayDark;
|
|
10
|
+
padding: 10px 0;
|
|
11
|
+
z-index: 10;
|
|
12
|
+
@include box-shadow(0 -2px 10px rgba(0,0,0,.2));
|
|
13
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// We want content input to always be pretty big
|
|
2
|
+
.simple_form {
|
|
3
|
+
input:not([type=submit]) {
|
|
4
|
+
@extend .span4;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
form.simple_form {
|
|
9
|
+
table.field-rows {
|
|
10
|
+
td, th {
|
|
11
|
+
text-align: left;
|
|
12
|
+
padding: 5px 10px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
tbody tr { padding: 5px 0; }
|
|
16
|
+
|
|
17
|
+
.controls { margin: 0; }
|
|
18
|
+
.control-group { margin: 0; }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
input.wide, textarea {
|
|
22
|
+
@extend .span7;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
input, textarea {
|
|
26
|
+
&.span1 { @extend .span1; }
|
|
27
|
+
&.span2 { @extend .span2; }
|
|
28
|
+
&.span3 { @extend .span3; }
|
|
29
|
+
&.span4 { @extend .span4; }
|
|
30
|
+
&.span5 { @extend .span5; }
|
|
31
|
+
&.span6 { @extend .span6; }
|
|
32
|
+
&.span7 { @extend .span7; }
|
|
33
|
+
&.span8 { @extend .span8; }
|
|
34
|
+
&.span9 { @extend .span9; }
|
|
35
|
+
&.span10 { @extend .span10; }
|
|
36
|
+
&.span11 { @extend .span11; }
|
|
37
|
+
&.span12 { @extend .span12; }
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
input.thin, textarea.thin {
|
|
41
|
+
@extend .span2;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
input.tiny {
|
|
45
|
+
@extend .span1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// For code inputs
|
|
49
|
+
textarea.fixed-font, input.fixed-font {
|
|
50
|
+
@include font-monospace($size: 11px);
|
|
51
|
+
background: #000;
|
|
52
|
+
color: #FFFF00;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
textarea {
|
|
56
|
+
&.tiny { height: 100px; }
|
|
57
|
+
&.short { height: 200px; }
|
|
58
|
+
&.tall { height: 600px; }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
fieldset legend {
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
&:hover {
|
|
64
|
+
background: #ffffcc;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.counter-notify {
|
|
69
|
+
@extend .span7;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.inline { // Extend bootstrap .inline
|
|
73
|
+
display: inline-block;
|
|
74
|
+
margin-right: 5px;
|
|
75
|
+
input[type=text] { @extend .span2; }
|
|
76
|
+
input[type=checkbox] { width: 20px; }
|
|
77
|
+
|
|
78
|
+
.controls {
|
|
79
|
+
margin-left: 10px;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.control-group.vertical {
|
|
84
|
+
label {
|
|
85
|
+
float: none;
|
|
86
|
+
text-align: left;
|
|
87
|
+
}
|
|
88
|
+
.controls { margin-left: 2px; }
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Select 2 overrides
|
|
93
|
+
.select[class*="span"] {
|
|
94
|
+
margin-left: 0;
|
|
95
|
+
float: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
// Work around incompatibility with CKEditor and Select2
|
|
100
|
+
.select2-offscreen {
|
|
101
|
+
position: static;
|
|
102
|
+
display: none !important;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.select2-container {
|
|
106
|
+
min-width: 200px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Select2 has z-index:9999 by default... no thanks
|
|
110
|
+
.select2-drop-mask {
|
|
111
|
+
z-index: 4;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.select2-drop {
|
|
115
|
+
z-index: 4;
|
|
116
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Styles for index lists
|
|
2
|
+
// To manage column widths, go to columns.css
|
|
3
|
+
|
|
4
|
+
.filters {
|
|
5
|
+
.select2-container {
|
|
6
|
+
min-width: 130px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.filter.label {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
margin-right: 10px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
form {
|
|
15
|
+
display: inline-block;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.header-highlighted {
|
|
20
|
+
background-color: $successBackground;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
th.clickable {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
&:hover {
|
|
26
|
+
background-color: $infoBackground;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.index-list {
|
|
31
|
+
position: relative;
|
|
32
|
+
|
|
33
|
+
th, td {
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
.cancel-link { float: right; }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
tbody.list {
|
|
39
|
+
tr {
|
|
40
|
+
// Style quick-edit cells
|
|
41
|
+
td[data-updatable=true] {
|
|
42
|
+
background: $warningBackground;
|
|
43
|
+
|
|
44
|
+
&:hover {
|
|
45
|
+
background: $infoBackground;
|
|
46
|
+
cursor: text;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
thead {
|
|
53
|
+
background: $white;
|
|
54
|
+
|
|
55
|
+
&.ready {
|
|
56
|
+
position: absolute;
|
|
57
|
+
|
|
58
|
+
&.affix {
|
|
59
|
+
z-index: 5;
|
|
60
|
+
border: 1px solid $grayLight;
|
|
61
|
+
position: fixed; // Have to use redefine it here to override .ready
|
|
62
|
+
top: $navOffset + $breadcrumbOffset + 10px !important;
|
|
63
|
+
background: $warningBackground;
|
|
64
|
+
@include box-shadow(0 2px 6px rgba(0,0,0,.2));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import 'outpost';
|