--- a/static/js/framework/views/inline.js Sun Jul 05 23:04:51 2015 +0800
+++ b/static/js/framework/views/inline.js Sun Jul 05 23:30:58 2015 +0800
renderInput: function(options) {
- this.$input = $('<input>').attr('type', 'text').addClass('input-xlarge').val(options.target.text());
+ this.$input = $('<input type="text" class="form-control input-sm">').val(options.target.text());
this.$input.keyup(function(e) {
- this.$el.append(this.$input, this.$saveButton, this.$cancelButton);
+ this.$group.append(this.$saveButton, this.$cancelButton);
+ this.$el.append(this.$input, this.$group);
options.target.after(this.$el);
renderTextarea: function(options) {
- this.$input = $('<textarea>').addClass('input-xlarge').attr('rows', 3).text(options.target.text());
+ this.$input = $('<textarea class="form-control input-sm" rows="3">').text(options.target.text());
this.$input.keyup(function(e) {
- this.$el.append(this.$input, this.$saveButton, this.$cancelButton);
+ this.$group.append(this.$saveButton, this.$cancelButton);
+ this.$el.append(this.$input, this.$group);
options.target.after(this.$el);
render: function(options) {
- this.$saveButton = $('<button>').addClass('btn btn-small btn-success').html('<i class="icon-white icon-ok"></i>');
- this.$cancelButton = $('<button>').addClass('btn btn-small').html('<i class="icon-remove"></i>');
- this.$el = $('<div>').addClass('inline-editor input-append');
+ this.$saveButton = $('<button class="btn btn-sm btn-success">').html('<i class="glyphicon glyphicon-ok"></i>');
+ this.$cancelButton = $('<button class="btn btn-sm btn-default">').html('<i class="glyphicon glyphicon-remove"></i>');
+ this.$el = $('<div class="inline-editor input-group">');
+ this.$group = $('<span class="input-group-btn">');
this.$cancelButton.click(function() {
--- a/static/js/framework/views/projects.js Sun Jul 05 23:04:51 2015 +0800
+++ b/static/js/framework/views/projects.js Sun Jul 05 23:30:58 2015 +0800
updateProgress: function(project) {
- .removeClass('progress-info progress-success progress-warning progress-danger')
- .addClass(project.get('color') ? 'progress-' + project.get('color') : '')
+ .removeClass('progress-bar-info progress-bar-success progress-bar-warning progress-bar-danger')
+ .addClass(project.get('color') ? 'progress-bar-' + project.get('color') : '')
+ .attr('aria-valuenow', (100 * project.tasks.progress()))
.css('width', (100 * project.tasks.progress()) + '%');
project.tasks.create = function(attributes, options) {
attributes = attributes || {};
- attributes['project_id'] = project.id;
+ attributes.project_id = project.id;
return tasks.create(attributes, options);
--- a/templates/index.html Sun Jul 05 23:04:51 2015 +0800
+++ b/templates/index.html Sun Jul 05 23:30:58 2015 +0800
<title>Fruit Bar Progress Tracker</title>
<link type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}" rel="shortcut icon">
- <link type="text/css" href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
+ <link type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
+ <link type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css" rel="stylesheet">
<link type="text/css" href="{{ url_for('static', filename='css/custom.css') }}" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.2.1/backbone-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone-localstorage.js/1.1.16/backbone.localStorage-min.js"></script>
- <script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
{% assets filters='jsmin', output='bundles/fruitbar.%(version)s.js',
'js/framework/models.js',
<body style="opacity: 0;">
- <div class="span2 ui-sidebar align-right">
- <button class="btn btn-mini btn-success btn-new-project">New project</button>
+ <div class="col-sm-2 ui-sidebar text-right">
+ <button class="btn btn-xs btn-success btn-new-project">New project</button>
- <span class="muted">Workspace</span> <span class="workspace-title"></span> <small>(<span class="project-counter"></span>)</small>
+ <span class="text-muted">Workspace</span> <span class="workspace-title"></span> <small>(<span class="project-counter"></span>)</small>
- <div class="span2 ui-sidebar">
- <ul class="nav nav-tabs nav-stacked workspace-tabs">
+ <div class="col-sm-2 ui-sidebar">
+ <ul class="nav nav-pills nav-stacked workspace-tabs">
<script id="workspace-tab-template" type="text/template">
<li data-workspace="<%- data.name %>">
<a href="#<%- data.name %>">#<%- data.name %></a>
<script id="project-template" type="text/template">
- <div class="span2 align-right ondemand">
- <button class="btn btn-mini btn-danger btn-delete-project">Delete</button>
- <button class="btn btn-mini btn-success btn-new-task">New task</button>
+ <div class="col-sm-2 text-right ondemand">
+ <button class="btn btn-xs btn-danger btn-delete-project">Delete</button>
+ <button class="btn btn-xs btn-success btn-new-task">New task</button>
<span class="inline-editable"
- <div class="progress progress-striped">
- <div class="bar"></div>
+ <div class="progress-bar progress-bar-striped" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"></div>
<script id="task-template" type="text/template">
- <div class="span2 align-right ondemand">
- <button class="btn btn-mini btn-danger btn-delete-task">Delete</button>
+ <div class="col-sm-2 text-right ondemand">
+ <button class="btn btn-xs btn-danger btn-delete-task">Delete</button>
<input type="checkbox" <% if (data.done) print('checked') %>>
<span class="inline-editable"
data-model-attribute="name"><%- data.name %></span>
<span class="inline-editable"
data-input-type="textarea"