Browse files

bootstrap start working

  • Loading branch information...
1 parent cd12d7a commit 2a6cf55981991b4de1bf94bd6f3c6b547734092d @brownman committed Nov 4, 2012
View
BIN .sass-cache/dde4918d3d6e6208f003e8a059cae43f879f4cbf/bootstrap_and_overrides.css.scssc
Binary file not shown.
View
3 Gemfile
@@ -17,7 +17,8 @@ gem 'jquery-rails', '2.0.2'
#gem 'twitter-bootstrap-rails'
-#gem 'rails-backbone', '0.7.0'
+gem 'rails-backbone'
+#, '0.7.0'
#gem 'thin'
View
6 Gemfile.lock
@@ -46,6 +46,7 @@ GEM
execjs
coffee-script-source (1.4.0)
diff-lcs (1.1.3)
+ ejs (1.0.0)
em-websocket (0.3.8)
addressable (>= 2.1.1)
eventmachine (>= 0.12.9)
@@ -122,6 +123,10 @@ GEM
activesupport (= 3.2.8)
bundler (~> 1.0)
railties (= 3.2.8)
+ rails-backbone (0.7.0)
+ coffee-script (~> 2.2.0)
+ ejs (~> 1.0.0)
+ railties (>= 3.1.0)
railties (3.2.8)
actionpack (= 3.2.8)
activesupport (= 3.2.8)
@@ -188,6 +193,7 @@ DEPENDENCIES
jquery-rails (= 2.0.2)
pg (= 0.12.2)
rails (= 3.2.8)
+ rails-backbone
rb-inotify (~> 0.8.8)
sass-rails (= 3.2.5)
sqlite3 (= 1.3.5)
View
7 Gemfile~
@@ -15,9 +15,10 @@ gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.6'
gem 'jquery-rails', '2.0.2'
-#gem 'twitter-bootstrap-rails'
+gem 'twitter-bootstrap-rails'
-#gem 'rails-backbone', '0.7.0'
+gem 'rails-backbone'
+#, '0.7.0'
#gem 'thin'
@@ -41,7 +42,7 @@ group :assets do
end
-gem 'jquery-rails'
+#gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
View
5 app/assets/javascripts/application.js
@@ -12,7 +12,7 @@
//
//= require jquery
//= require jquery_ujs
-//= require twitter/bootstrap
+//= require bootstrap
//= require underscore
//= require backbone
//= require backbone-relational
@@ -22,6 +22,3 @@
//= require backbone/rails_backbone_relational
//= require_tree .
-alert = (msg) ->
- console.log(this)
- window.alert(msg)
View
3 app/assets/javascripts/application.js~
@@ -22,6 +22,3 @@
//= require backbone/rails_backbone_relational
//= require_tree .
-alert = (msg) ->
- console.log(this)
- alert(msg)
View
85 app/assets/javascripts/backbone/models/task.js
@@ -1,86 +1 @@
-TodoList.Models.Task = Backbone.Model.extend({
- defaults: {
- name: '',
- complete: false
- },
-
- url: function() {
- if (this.isNew()) {
- return "/tasks.json";
- } else {
- return "/tasks/" + this.id + ".json";
- }
- },
-
- toJSON: function() {
- return { task: this.attributes };
- },
-
- getId: function() {
- return this.get('id');
- },
-
- getName: function() {
- return this.get('name');
- },
-
- getComplete: function() {
- return this.get('complete');
- },
- replace :function(str, sym) {
- for (var i = 0; i < sym.length ; i++) {
- str = this.replace_one(str, sym[i]);
- //str.replace(sym[i], sym[i].concat('='));
- }
-
- //.replace(",", ",=");
- return str;
- },
- replace_one : function(story,sign)
- {
- //sign = "."
- var to_sign = sign + "$"
- var from="[" + sign + "]"
- var from_reg = new RegExp(from,"g");
-
- var str = story.replace(from_reg , to_sign);
- return str;
- },
-
- split : function(){
-var str = this.get('name')
- var story_enc = str
-
- story_enc = story_enc.replace(/\n/g, " ");
-
- var arr_symbols = [',', '!', '.', "?", ":", ";", "=" ]
- story_enc = this.replace(story_enc, arr_symbols);
-
-
-
- //split replace
- var story_arr = story_enc.split('$');
-
- // console.log(story_arr);
-
- //each symbol to replace str
- // this.trace(story_arr);
- return story_arr
-
- }
-
-
-
-
-});
-TodoList.Collections.Tasks = Backbone.Collection.extend({
-
- url: '/tasks.json',
- model: TodoList.Models.Task,
-
- parse: function(response) {
- return response.tasks;
- }
-
-});
View
11 app/assets/javascripts/backbone/models/task.js~
@@ -1,4 +1,8 @@
-TodoList.Models.Task = Backbone.Model.extend({
+
+/*
+ *TodoList.Models.Task
+ */
+window.Task = Backbone.Model.extend({
defaults: {
name: '',
@@ -74,7 +78,10 @@ var str = this.get('name')
});
-TodoList.Collections.Tasks = Backbone.Collection.extend({
+/*
+ *TodoList.Collections.Tasks
+ */
+window.Tasks= Backbone.Collection.extend({
url: '/tasks.json',
model: TodoList.Models.Task,
View
7 app/assets/javascripts/bootstrap.js.coffee
@@ -1,7 +1,8 @@
jQuery ->
- $("a[rel=popover]").popover()
- $(".tooltip").tooltip()
- $("a[rel=tooltip]").tooltip()
+ #$("a[rel=popover]").popover()
+ #$(".tooltip").tooltip()
+ #$("a[rel=tooltip]").tooltip()
#$('.accordion-group').collapse({
#toggle: true
#})
+ console.log('start')
View
13 app/assets/javascripts/bootstrap.js.coffee~
@@ -1,7 +1,8 @@
jQuery ->
- $("a[rel=popover]").popover()
- $(".tooltip").tooltip()
- $("a[rel=tooltip]").tooltip()
- $('.accordion-group').collapse({
- toggle: true
- })
+ #$("a[rel=popover]").popover()
+ #$(".tooltip").tooltip()
+ #$("a[rel=tooltip]").tooltip()
+ #$('.accordion-group').collapse({
+ #toggle: true
+ #})
+ console.log('start')
View
128 app/assets/stylesheets/bootstrap_and_overrides.css.less
@@ -1,128 +0,0 @@
-@import "twitter/bootstrap/bootstrap";
-
-/*
- *@import "twitter/bootstrap/responsive";
- */
-
-
-
-// Set the correct sprite paths
-@iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');
-@iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png');
-
-// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
-// Note: If you use asset_path() here, your compiled boostrap_and_overrides.css will not
-// have the proper paths. So for now we use the absolute path.
-@fontAwesomeEotPath: '/assets/fontawesome-webfont.eot';
-@fontAwesomeWoffPath: '/assets/fontawesome-webfont.woff';
-@fontAwesomeTtfPath: '/assets/fontawesome-webfont.ttf';
-@fontAwesomeSvgPath: '/assets/fontawesome-webfont.svg';
-
-// Font Awesome
-@import "fontawesome";
-
-// Your custom LESS stylesheets goes here
-//
-// Since bootstrap was imported above you have access to its mixins which
-// you may use and inherit here
-//
-// If you'd like to override bootstrap's own variables, you can do so here as well
-// See http://twitter.github.com/bootstrap/less.html for their names and documentation
-//
-// Example:
-// @linkColor: #ff0000;
-div.new_comment {
-background-color:#099993;
-
-}
-
-td {
-padding-top: 1em;
-/*
- *vertical-align:top;
- */
-text-align:left;
-height: 100%;
-
-
-}
-tr {
-/*
- *width: 100%;
- */
-}
-
-button {
-text-align: left;
-
-/*
- *padding-left: 0px;
- */
-/*
- *text-align: left;
- */
-/*
- *padding: 0px;
- */
- padding: 2em;
-
-
-
-
-border:2px solid #000000;
-
-}
-
-.test
-{
-
-/*
- *text-justify:inter-word;
- */
-
-
-
-/*
- *text-align:justify;
- */
-
-white-space:pre;
-/*
- *overflow:hidden;
- */
-border:1px solid #000000;
-/*
- *height: 4em;
- */
-
-/*
- *overflow-y:none;
- */
-
-}
-
-.test2:hover {
-
-white-space:normal;
-
-border:1px solid #0000ff;
-font-stretch:expanded;
-font-weight:bold;
-/*
- *transition-delay: 1s;
- */
-}
-.test1{
-
-white-space:normal;
-
-border:2px solid #ff0000;
-font-stretch:expanded;
-font-weight:bold;
-/*
- *transition-delay: 1s;
- */
-}
-
-
-
View
108 app/assets/stylesheets/bootstrap_and_overrides.css.scss
@@ -0,0 +1,108 @@
+@import "bootstrap";
+
+/* mixins, variables, etc. */
+
+$grayMediumLight: #eaeaea;
+
+@mixin box_sizing {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+/* universal */
+div.new_comment {
+background-color:#099993;
+
+}
+
+td {
+padding-top: 1em;
+/*
+ *vertical-align:top;
+ */
+text-align:left;
+height: 100%;
+
+
+}
+tr {
+/*
+ *width: 100%;
+ */
+}
+
+button {
+text-align: left;
+
+/*
+ *padding-left: 0px;
+ */
+/*
+ *text-align: left;
+ */
+/*
+ *padding: 0px;
+ */
+ padding: 2em;
+
+
+
+
+border:2px solid #000000;
+
+}
+
+.test
+{
+
+/*
+ *text-justify:inter-word;
+ */
+
+
+
+/*
+ *text-align:justify;
+ */
+
+white-space:pre;
+/*
+ *overflow:hidden;
+ */
+border:1px solid #000000;
+/*
+ *height: 4em;
+ */
+
+/*
+ *overflow-y:none;
+ */
+
+}
+
+.test2:hover {
+
+white-space:normal;
+
+border:1px solid #0000ff;
+font-stretch:expanded;
+font-weight:bold;
+/*
+ *transition-delay: 1s;
+ */
+}
+.test1{
+
+white-space:normal;
+
+border:2px solid #ff0000;
+font-stretch:expanded;
+font-weight:bold;
+/*
+ *transition-delay: 1s;
+ */
+}
+
+
+

0 comments on commit 2a6cf55

Please sign in to comment.