Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-03-26 22:41:58 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-03-26 22:41:58 +0400
commit7d56a51bdcffa2413a68779e4899e8139c1ba4f9 (patch)
tree7dcb80148a424b21cd4791ca22da59819f5be0d3 /app/views
parentf1c534c68eecf68c72ce401e30c3d7d846052885 (diff)
Js refactoring and ajax animation replaced
Diffstat (limited to 'app/views')
-rw-r--r--app/views/issues/index.html.haml2
-rw-r--r--app/views/merge_requests/show.html.haml3
-rw-r--r--app/views/projects/_form.html.haml2
-rw-r--r--app/views/projects/create.js.haml1
-rw-r--r--app/views/projects/edit.html.haml31
-rw-r--r--app/views/projects/new.html.haml31
-rw-r--r--app/views/projects/update.js.haml1
7 files changed, 19 insertions, 52 deletions
diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml
index 283e936e38e..7146027b1d5 100644
--- a/app/views/issues/index.html.haml
+++ b/app/views/issues/index.html.haml
@@ -3,7 +3,7 @@
Issues
%span.rss-icon
= link_to project_issues_path(@project, :atom, { :private_token => current_user.private_token }) do
- = image_tag "Rss-UI.PNG", :width => 22, :title => "feed"
+ = image_tag "Rss-UI.PNG", :width => 16, :title => "feed"
- if can? current_user, :write_issue, @project
= link_to new_project_issue_path(@project), :class => "right btn small", :title => "New Issue", :remote => true do
diff --git a/app/views/merge_requests/show.html.haml b/app/views/merge_requests/show.html.haml
index 4f1d49b8002..88624a58388 100644
--- a/app/views/merge_requests/show.html.haml
+++ b/app/views/merge_requests/show.html.haml
@@ -73,12 +73,11 @@
= link_to "#diffs", "data-url" => diffs_project_merge_request_path(@project, @merge_request), :class => "merge-diffs-tab tab" do
Diff
- %img{:src => "/assets/ajax-loader-facebook.gif", :class => "dashboard-loader"}
.merge_request_notes#notes= render "notes/notes", :tid => @merge_request.id, :tt => "merge_request"
.merge-request-diffs
-
+.status
:javascript
$(function(){
diff --git a/app/views/projects/_form.html.haml b/app/views/projects/_form.html.haml
index 5d22f11d579..8f6244f2f5b 100644
--- a/app/views/projects/_form.html.haml
+++ b/app/views/projects/_form.html.haml
@@ -49,7 +49,7 @@
.clearfix
= f.label :description
.input
- = f.text_area :description, :placeholder => "project description", :class => "xlarge", :rows => 4
+ = f.text_area :description, :placeholder => "project description", :class => "xxlarge", :rows => 5
%p.hint Markdown is enabled.
%br
diff --git a/app/views/projects/create.js.haml b/app/views/projects/create.js.haml
index 2b3106c8222..80ca332da37 100644
--- a/app/views/projects/create.js.haml
+++ b/app/views/projects/create.js.haml
@@ -3,5 +3,6 @@
location.href = "#{project_path(@project, :notice => 'Project was successfully created.')}";
- else
:plain
+ $('.project_new_holder').show();
$("#new_project").replaceWith("#{escape_javascript(render('form'))}");
$('.ajax_loader').hide();
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index be8aae7d712..53a0320b924 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -1,29 +1,12 @@
= render "project_head"
-%h3 Edit Project
-%hr
-= render "projects/form"
-%div{ :class => "ajax_loader", :style => "display:none;height:200px;"}
+.project_edit_holder
+ %h3 Edit Project
+ %hr
+ = render "projects/form"
+%div.ajax_loader.hide
%center
- = image_tag "ajax-loader.gif", :class => "append-bottom"
+ %div.padded= image_tag "ajax_loader.gif"
%h3.prepend-top Saving project &amp; repository. Please wait...
:javascript
- $(function(){
- $("#project_name").live("change", function(){
- var slug = slugify($(this).val());
- $("#project_code").val(slug);
- $("#project_path").val(slug);
- });
- });
-
- function slugify(text) {
- return text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase();
- }
-
- $(function(){
- $('.edit_project').live('ajax:before', function() {
- $(this).hide();
- $('.ajax_loader').show();
- });
- $('form #project_default_branch').chosen();
- })
+ $(function(){ new Projects(); });
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index 5883e7b8890..3f3d51d038a 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -1,28 +1,11 @@
-%h3 New Project
-%hr
-= render 'form'
-%div{ :class => "ajax_loader", :style => "display:none;height:200px;"}
+.project_new_holder
+ %h3 New Project
+ %hr
+ = render 'form'
+%div.ajax_loader.hide
%center
- = image_tag "ajax-loader.gif", :class => "append-bottom"
+ %div.padded= image_tag "ajax_loader.gif"
%h3.prepend-top Creating project &amp; repository. Please wait for few minutes
:javascript
- $(function(){
- $("#project_name").live("change", function(){
- var slug = slugify($(this).val());
- $("#project_code").val(slug);
- $("#project_path").val(slug);
- });
- });
-
- function slugify(text) {
- return text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase();
- }
-
- $(function(){
- $('.new_project').live('ajax:before', function() {
- $(this).hide();
- $('.ajax_loader').show();
- });
- $('form #project_default_branch').chosen();
- })
+ $(function(){ new Projects(); });
diff --git a/app/views/projects/update.js.haml b/app/views/projects/update.js.haml
index de12527e004..ee0d36996b5 100644
--- a/app/views/projects/update.js.haml
+++ b/app/views/projects/update.js.haml
@@ -3,5 +3,6 @@
location.href = "#{edit_project_path(@project, :notice => 'Project was successfully updated.')}";
- else
:plain
+ $('.project_edit_holder').show();
$(".edit_project").replaceWith("#{escape_javascript(render('form'))}");
$('.ajax_loader').hide();