summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2012-12-11 15:07:27 -0800
committerjessib <jessib@leap.se>2012-12-11 15:07:27 -0800
commit4259cad450fee703dc34ebe5322de994d06a5448 (patch)
tree8c07fe6f44379033a0fc677176dd8c8f935ad4a1
parent7a9a4f4e7bd090fd27e05b03f93832d79f5f8db2 (diff)
Playing around with using x-editable, which isn't yet working.
-rw-r--r--app/assets/javascripts/application.js3
-rw-r--r--app/assets/stylesheets/application.scss2
-rw-r--r--help/app/assets/javascripts/tickets.js.coffee6
-rw-r--r--help/app/views/tickets/show.html.haml6
-rw-r--r--ui_dependencies.rb1
5 files changed, 18 insertions, 0 deletions
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index 23d7fef..57e6d62 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -16,6 +16,9 @@
//= require users
//= require_tree .
//= require bootstrap
+//= require bootstrap-editable
+//= require bootstrap-editable-rails
+//= require bootstrap-editable-inline
//= require jquery.pjax
$(function() {
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index 8dec07d..cb5fa1b 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -12,3 +12,5 @@ table.table-hover .btn {
table.table-hover tr:hover .btn {
opacity: 1;
}
+
+@import "bootstrap-editable"; \ No newline at end of file
diff --git a/help/app/assets/javascripts/tickets.js.coffee b/help/app/assets/javascripts/tickets.js.coffee
new file mode 100644
index 0000000..039ce91
--- /dev/null
+++ b/help/app/assets/javascripts/tickets.js.coffee
@@ -0,0 +1,6 @@
+$("#title").editable({
+ type: 'text',
+ pk: 1,
+ url: '/blah',
+ title: 'TEXT here'
+ }); \ No newline at end of file
diff --git a/help/app/views/tickets/show.html.haml b/help/app/views/tickets/show.html.haml
index d9f594b..3e4acb9 100644
--- a/help/app/views/tickets/show.html.haml
+++ b/help/app/views/tickets/show.html.haml
@@ -1,4 +1,10 @@
%h2= @ticket.title
+
+= #%a#title.editable.editable-click{"data-name" => "title", "data-original-title" => "Enter username", "data-resource" => "post", "data-type" => "text", "data-url" => ticket_path(@ticket.id), "data-pk" => @ticket.id, :href => "#"} test
+
+%a#title.editable.editable-click{:href => "#"} test
+
+%p
- if @ticket.email
email:
= @ticket.email
diff --git a/ui_dependencies.rb b/ui_dependencies.rb
index eed79a3..10eac67 100644
--- a/ui_dependencies.rb
+++ b/ui_dependencies.rb
@@ -6,6 +6,7 @@ gem "pjax_rails"
gem 'client_side_validations'
gem 'client_side_validations-simple_form'
gem 'kaminari', "0.13.0" # for pagination. trying 0.13.0 as there seem to be issues with 0.14.0 when using couchrest
+gem 'bootstrap-editable-rails'
group :assets do
gem "haml-rails", "~> 0.3.4"