mix-rails 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -4
- data/MIX_RAILS_VERSION +1 -1
- data/README.md +15 -8
- data/admix/app/assets/javascripts/admix/application.js.coffee +13 -4
- data/admix/app/assets/javascripts/admix/tipsy_init.js.coffee +3 -0
- data/admix/app/assets/stylesheets/admix/admix_bootstrap.scss +1 -0
- data/admix/app/assets/stylesheets/admix/application.css +3 -1
- data/admix/lib/admix/version.rb +1 -1
- data/mix-rails-albums/app/assets/javascripts/backbone/models/photo.js.coffee +33 -1
- data/mix-rails-albums/app/assets/javascripts/backbone/routers/photos_router.js.coffee +3 -3
- data/mix-rails-albums/app/assets/javascripts/backbone/templates/photos/thumbnail.hamlc.erb +5 -3
- data/mix-rails-albums/app/assets/javascripts/backbone/views/photos/thumbnail_view.js.coffee +18 -10
- data/mix-rails-albums/app/assets/javascripts/backbone/views/photos/upload_index_view.js.coffee +1 -0
- data/mix-rails-albums/app/assets/javascripts/photos/upload.js.coffee.erb +19 -16
- data/mix-rails-albums/app/assets/javascripts/views/fileview.js +0 -1
- data/mix-rails-albums/app/controllers/admix/photos_controller.rb +6 -3
- data/mix-rails-albums/app/models/album.rb +1 -3
- data/mix-rails-albums/app/uploaders/albums/image_uploader.rb +1 -1
- data/mix-rails-albums/lib/mix-rails-albums/version.rb +1 -1
- data/mix-rails-auth/lib/mix-rails-auth/version.rb +1 -1
- data/mix-rails-core/app/controllers/mix_controller.rb +2 -0
- data/mix-rails-core/app/views/{application → mix}/_title.html.haml +0 -0
- data/mix-rails-core/lib/mix-rails-core/version.rb +1 -1
- data/mix-rails-core/lib/mix-rails-core.rb +3 -0
- data/mix-rails-core/mix-rails-core.gemspec +43 -41
- data/mix-rails-message-board/lib/mix-rails-message-board/version.rb +1 -1
- data/mix-rails-settings/lib/mix-rails-settings/version.rb +1 -1
- data/mix-rails-songs/app/controllers/songs_controller.rb +14 -1
- data/mix-rails-songs/app/views/songs/player.haml +1 -1
- data/mix-rails-songs/config/routes.rb +2 -1
- data/mix-rails-songs/lib/mix-rails-songs/version.rb +1 -1
- data/mix-rails-videos/lib/mix-rails-videos/version.rb +1 -1
- data/mix-rails-vouchers/lib/mix-rails-vouchers/version.rb +1 -1
- data/mix-rails-wireframe/.gitignore +7 -0
- data/mix-rails-wireframe/Gemfile +17 -0
- data/mix-rails-wireframe/MIT-LICENSE +20 -0
- data/mix-rails-wireframe/README.rdoc +3 -0
- data/mix-rails-wireframe/Rakefile +27 -0
- data/mix-rails-wireframe/app/assets/images/mix-rails-wireframe/.gitkeep +0 -0
- data/mix-rails-wireframe/app/assets/javascripts/mix-rails-wireframe/.gitkeep +0 -0
- data/mix-rails-wireframe/app/assets/javascripts/mix-rails-wireframe.js.coffee +0 -0
- data/mix-rails-wireframe/app/assets/stylesheets/mix-rails-wireframe/.gitkeep +0 -0
- data/mix-rails-wireframe/app/assets/stylesheets/mix-rails-wireframe.sass +1 -0
- data/mix-rails-wireframe/app/controllers/.gitkeep +0 -0
- data/mix-rails-wireframe/app/controllers/wireframe_controller.rb +11 -0
- data/mix-rails-wireframe/app/helpers/.gitkeep +0 -0
- data/mix-rails-wireframe/app/helpers/wireframe_helper.rb +12 -0
- data/mix-rails-wireframe/app/mailers/.gitkeep +0 -0
- data/mix-rails-wireframe/app/models/.gitkeep +0 -0
- data/mix-rails-wireframe/app/views/.gitkeep +0 -0
- data/mix-rails-wireframe/app/views/layouts/wireframe.haml +14 -0
- data/mix-rails-wireframe/app/views/wireframe/home.haml +2 -0
- data/mix-rails-wireframe/config/routes.rb +7 -0
- data/mix-rails-wireframe/lib/mix-rails-wireframe/engine.rb +4 -0
- data/mix-rails-wireframe/lib/mix-rails-wireframe/version.rb +10 -0
- data/mix-rails-wireframe/lib/mix-rails-wireframe.rb +4 -0
- data/mix-rails-wireframe/lib/tasks/mix-rails-wireframe_tasks.rake +4 -0
- data/mix-rails-wireframe/mix-rails-wireframe.gemspec +19 -0
- data/mix-rails-wireframe/script/rails +8 -0
- data/mix-rails-wireframe/spec/dummy/README.rdoc +261 -0
- data/mix-rails-wireframe/spec/dummy/Rakefile +7 -0
- data/mix-rails-wireframe/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/mix-rails-wireframe/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/mix-rails-wireframe/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/mix-rails-wireframe/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/mix-rails-wireframe/spec/dummy/app/mailers/.gitkeep +0 -0
- data/mix-rails-wireframe/spec/dummy/app/models/.gitkeep +0 -0
- data/mix-rails-wireframe/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/mix-rails-wireframe/spec/dummy/config/application.rb +65 -0
- data/mix-rails-wireframe/spec/dummy/config/boot.rb +10 -0
- data/mix-rails-wireframe/spec/dummy/config/environment.rb +5 -0
- data/mix-rails-wireframe/spec/dummy/config/environments/development.rb +31 -0
- data/mix-rails-wireframe/spec/dummy/config/environments/production.rb +64 -0
- data/mix-rails-wireframe/spec/dummy/config/environments/test.rb +35 -0
- data/mix-rails-wireframe/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/mix-rails-wireframe/spec/dummy/config/initializers/inflections.rb +15 -0
- data/mix-rails-wireframe/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/mix-rails-wireframe/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/mix-rails-wireframe/spec/dummy/config/initializers/session_store.rb +8 -0
- data/mix-rails-wireframe/spec/dummy/config/initializers/wrap_parameters.rb +10 -0
- data/mix-rails-wireframe/spec/dummy/config/locales/en.yml +5 -0
- data/mix-rails-wireframe/spec/dummy/config/routes.rb +58 -0
- data/mix-rails-wireframe/spec/dummy/config.ru +4 -0
- data/mix-rails-wireframe/spec/dummy/lib/assets/.gitkeep +0 -0
- data/mix-rails-wireframe/spec/dummy/log/.gitkeep +0 -0
- data/mix-rails-wireframe/spec/dummy/public/404.html +26 -0
- data/mix-rails-wireframe/spec/dummy/public/422.html +26 -0
- data/mix-rails-wireframe/spec/dummy/public/500.html +25 -0
- data/mix-rails-wireframe/spec/dummy/public/favicon.ico +0 -0
- data/mix-rails-wireframe/spec/dummy/script/rails +6 -0
- data/mix-rails-writer/lib/mix-rails-writer/version.rb +1 -1
- data/mix-rails.gemspec +19 -14
- data/version.rb +1 -1
- metadata +132 -38
- data/admix/app/assets/javascripts/admix/tipsy_init.js +0 -5
- data/admix/app/assets/stylesheets/admix/bootstrap.min.css +0 -868
- data/mix-rails-albums/app/assets/javascripts/backbone/templates/photos/edit.jst.ejs +0 -20
- data/mix-rails-albums/app/assets/javascripts/backbone/templates/photos/index.jst.ejs +0 -15
- data/mix-rails-albums/app/assets/javascripts/backbone/templates/photos/modal.hamlc.erb +0 -14
- data/mix-rails-albums/app/assets/javascripts/backbone/templates/photos/new.jst.ejs +0 -20
- data/mix-rails-albums/app/assets/javascripts/backbone/templates/photos/photo.jst.ejs +0 -6
- data/mix-rails-albums/app/assets/javascripts/backbone/templates/photos/show.jst.ejs +0 -12
- data/mix-rails-albums/app/assets/javascripts/backbone/views/photos/edit_view.js.coffee +0 -24
- data/mix-rails-albums/app/assets/javascripts/backbone/views/photos/index_view.js.coffee +0 -20
- data/mix-rails-albums/app/assets/javascripts/backbone/views/photos/new_view.js.coffee +0 -37
- data/mix-rails-albums/app/assets/javascripts/backbone/views/photos/photo_view.js.coffee +0 -19
- data/mix-rails-albums/app/assets/javascripts/backbone/views/photos/show_view.js.coffee +0 -8
@@ -1,20 +0,0 @@
|
|
1
|
-
<h1>Edit photo</h1>
|
2
|
-
|
3
|
-
<form id="edit-photo" name="photo">
|
4
|
-
<div class="field">
|
5
|
-
<label for="image"> image:</label>
|
6
|
-
<input type="text" name="image" id="image" value="<%= image %>" >
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div class="field">
|
10
|
-
<label for="description"> description:</label>
|
11
|
-
<input type="text" name="description" id="description" value="<%= description %>" >
|
12
|
-
</div>
|
13
|
-
|
14
|
-
<div class="actions">
|
15
|
-
<input type="submit" value="Update Photo" />
|
16
|
-
</div>
|
17
|
-
|
18
|
-
</form>
|
19
|
-
|
20
|
-
<a href="#/index">Back</a>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
.modal.hide.fade.admix-photo-modal{id: "photo-modal-#{@id}"}
|
2
|
-
.modal-header
|
3
|
-
%button.close{"aria-hidden" => "true", "data-dismiss" => "modal", :type => "button"} ×
|
4
|
-
%h3 Detalhes da foto
|
5
|
-
.modal-body
|
6
|
-
.edit-area.pull-right
|
7
|
-
%textarea.span5{id: "input_photo_description_#{@id}",placeholder: 'Adicione uma descrição para esta foto.'}
|
8
|
-
#{@description}
|
9
|
-
.photo
|
10
|
-
%img{src: @image.medium.url}
|
11
|
-
%p One fine body…
|
12
|
-
.modal-footer
|
13
|
-
%a.btn{href:"#", "data-dismiss": "modal"} Cancelar
|
14
|
-
%a.btn.btn-primary.save{:href => "#"} Salvar mudanças
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<h1>New photo</h1>
|
2
|
-
|
3
|
-
<form id="new-photo" name="photo">
|
4
|
-
<div class="field">
|
5
|
-
<label for="image"> image:</label>
|
6
|
-
<input type="text" name="image" id="image" value="<%= image %>" >
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div class="field">
|
10
|
-
<label for="description"> description:</label>
|
11
|
-
<input type="text" name="description" id="description" value="<%= description %>" >
|
12
|
-
</div>
|
13
|
-
|
14
|
-
<div class="actions">
|
15
|
-
<input type="submit" value="Create Photo" />
|
16
|
-
</div>
|
17
|
-
|
18
|
-
</form>
|
19
|
-
|
20
|
-
<a href="#/index">Back</a>
|
@@ -1,24 +0,0 @@
|
|
1
|
-
Application.Views.Photos ||= {}
|
2
|
-
|
3
|
-
class Application.Views.Photos.EditView extends Backbone.View
|
4
|
-
template: JST["backbone/templates/photos/edit"]
|
5
|
-
|
6
|
-
events:
|
7
|
-
"submit #edit-photo": "update"
|
8
|
-
|
9
|
-
update: (e) ->
|
10
|
-
e.preventDefault()
|
11
|
-
e.stopPropagation()
|
12
|
-
|
13
|
-
@model.save(null,
|
14
|
-
success: (photo) =>
|
15
|
-
@model = photo
|
16
|
-
window.location.hash = "/#{@model.id}"
|
17
|
-
)
|
18
|
-
|
19
|
-
render: ->
|
20
|
-
@$el.html(@template(@model.toJSON() ))
|
21
|
-
|
22
|
-
this.$("form").backboneLink(@model)
|
23
|
-
|
24
|
-
return this
|
@@ -1,20 +0,0 @@
|
|
1
|
-
Application.Views.Photos ||= {}
|
2
|
-
|
3
|
-
class Application.Views.Photos.IndexView extends Backbone.View
|
4
|
-
template: JST["backbone/templates/photos/index"]
|
5
|
-
|
6
|
-
initialize: () ->
|
7
|
-
@options.photos.bind('reset', @addAll)
|
8
|
-
|
9
|
-
addAll: () =>
|
10
|
-
@options.photos.each(@addOne)
|
11
|
-
|
12
|
-
addOne: (photo) =>
|
13
|
-
view = new Application.Views.Photos.PhotoView({model : photo})
|
14
|
-
@$("tbody").append(view.render().el)
|
15
|
-
|
16
|
-
render: =>
|
17
|
-
@$el.html(@template(photos: @options.photos.toJSON() ))
|
18
|
-
@addAll()
|
19
|
-
|
20
|
-
return this
|
@@ -1,37 +0,0 @@
|
|
1
|
-
Application.Views.Photos ||= {}
|
2
|
-
|
3
|
-
class Application.Views.Photos.NewView extends Backbone.View
|
4
|
-
template: JST["backbone/templates/photos/new"]
|
5
|
-
|
6
|
-
events:
|
7
|
-
"submit #new-photo": "save"
|
8
|
-
|
9
|
-
constructor: (options) ->
|
10
|
-
super(options)
|
11
|
-
@model = new @collection.model()
|
12
|
-
|
13
|
-
@model.bind("change:errors", () =>
|
14
|
-
this.render()
|
15
|
-
)
|
16
|
-
|
17
|
-
save: (e) ->
|
18
|
-
e.preventDefault()
|
19
|
-
e.stopPropagation()
|
20
|
-
|
21
|
-
@model.unset("errors")
|
22
|
-
|
23
|
-
@collection.create(@model.toJSON(),
|
24
|
-
success: (photo) =>
|
25
|
-
@model = photo
|
26
|
-
window.location.hash = "/#{@model.id}"
|
27
|
-
|
28
|
-
error: (photo, jqXHR) =>
|
29
|
-
@model.set({errors: $.parseJSON(jqXHR.responseText)})
|
30
|
-
)
|
31
|
-
|
32
|
-
render: ->
|
33
|
-
@$el.html(@template(@model.toJSON() ))
|
34
|
-
|
35
|
-
this.$("form").backboneLink(@model)
|
36
|
-
|
37
|
-
return this
|
@@ -1,19 +0,0 @@
|
|
1
|
-
Application.Views.Photos ||= {}
|
2
|
-
|
3
|
-
class Application.Views.Photos.PhotoView extends Backbone.View
|
4
|
-
template: JST["backbone/templates/photos/photo"]
|
5
|
-
|
6
|
-
events:
|
7
|
-
"click .destroy" : "destroy"
|
8
|
-
|
9
|
-
tagName: "tr"
|
10
|
-
|
11
|
-
destroy: () ->
|
12
|
-
@model.destroy()
|
13
|
-
this.remove()
|
14
|
-
|
15
|
-
return false
|
16
|
-
|
17
|
-
render: ->
|
18
|
-
@$el.html(@template(@model.toJSON() ))
|
19
|
-
return this
|