Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
233d89a9
Commit
233d89a9
authored
10 years ago
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable buttons if required forms are empty
parent
6c9cb565
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
app/views/projects/blob/_remove.html.haml
app/views/projects/blob/_remove.html.haml
+4
-1
app/views/projects/network/show.html.haml
app/views/projects/network/show.html.haml
+4
-2
app/views/projects/new_tree/show.html.haml
app/views/projects/new_tree/show.html.haml
+4
-4
No files found.
app/views/projects/blob/_remove.html.haml
View file @
233d89a9
...
@@ -19,5 +19,8 @@
...
@@ -19,5 +19,8 @@
.form-group
.form-group
.col-sm-2
.col-sm-2
.col-sm-10
.col-sm-10
=
submit_tag
'Remove file'
,
class:
'btn btn-remove'
=
submit_tag
'Remove file'
,
class:
'btn btn-remove
btn-remove-file
'
=
link_to
"Cancel"
,
'#'
,
class:
"btn btn-cancel"
,
"data-dismiss"
=>
"modal"
=
link_to
"Cancel"
,
'#'
,
class:
"btn btn-cancel"
,
"data-dismiss"
=>
"modal"
:javascript
disableButtonIfEmptyField
(
'
#commit_message
'
,
'
.btn-remove-file
'
)
This diff is collapsed.
Click to expand it.
app/views/projects/network/show.html.haml
View file @
233d89a9
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
.project-network
.project-network
.controls
.controls
=
form_tag
project_network_path
(
@project
,
@id
),
method: :get
,
class:
'form-inline network-form'
do
|
f
|
=
form_tag
project_network_path
(
@project
,
@id
),
method: :get
,
class:
'form-inline network-form'
do
|
f
|
=
text_field_tag
:extended_sha1
,
@options
[
:extended_sha1
],
placeholder:
"Input an extended SHA1 syntax"
,
class:
"search-input form-control input-mx-250"
=
text_field_tag
:extended_sha1
,
@options
[
:extended_sha1
],
placeholder:
"Input an extended SHA1 syntax"
,
class:
'search-input form-control input-mx-250 search-sha'
=
button_tag
type:
'submit'
,
class:
'btn btn-success'
do
=
button_tag
type:
'submit'
,
class:
'btn btn-success
btn-search-sha
'
do
%i
.icon-search
%i
.icon-search
.inline.prepend-left-20
.inline.prepend-left-20
.checkbox.light
.checkbox.light
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
=
spinner
nil
,
true
=
spinner
nil
,
true
:javascript
:javascript
disableButtonIfEmptyField
(
'
#extended_sha1
'
,
'
.btn-search-sha
'
)
network_graph
=
new
Network
({
network_graph
=
new
Network
({
url
:
'
#{
project_network_path
(
@project
,
@ref
,
@options
.
merge
(
format: :json
))
}
'
,
url
:
'
#{
project_network_path
(
@project
,
@ref
,
@options
.
merge
(
format: :json
))
}
'
,
commit_url
:
'
#{
project_commit_path
(
@project
,
'ae45ca32'
).
gsub
(
"ae45ca32"
,
"%s"
)
}
'
,
commit_url
:
'
#{
project_commit_path
(
@project
,
'ae45ca32'
).
gsub
(
"ae45ca32"
,
"%s"
)
}
'
,
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/new_tree/show.html.haml
View file @
233d89a9
%h3
.page-title
New file
%h3
.page-title
New file
%hr
%hr
.file-editor
.file-editor
=
form_tag
(
project_new_tree_path
(
@project
,
@id
),
method: :put
,
class:
"form-horizontal"
)
do
=
form_tag
(
project_new_tree_path
(
@project
,
@id
),
method: :put
,
class:
'form-horizontal form-new-file'
)
do
.form-group.commit_message-group
.form-group.commit_message-group
=
label_tag
'file_name'
,
class:
"control-label"
do
=
label_tag
'file_name'
,
class:
'control-label'
do
File name
File name
.col-sm-10
.col-sm-10
.input-group
.input-group
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
=
label_tag
'commit_message'
,
class:
"control-label"
do
=
label_tag
'commit_message'
,
class:
"control-label"
do
Commit message
Commit message
.col-sm-10
.col-sm-10
=
render
'shared/commit_message_container'
,
{
textarea:
text_area_tag
(
'commit_message'
,
=
render
'shared/commit_message_container'
,
{
textarea:
text_area_tag
(
'commit_message
form-control
'
,
params
[
:commit_message
],
placeholder:
"Added new file"
,
required:
true
,
rows:
3
,
class:
'form-control'
)}
params
[
:commit_message
],
placeholder:
"Added new file"
,
required:
true
,
rows:
3
,
class:
'form-control'
)}
.file-holder
.file-holder
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
ace
.
config
.
set
(
"
modePath
"
,
gon
.
relative_url_root
+
"
#{
Gitlab
::
Application
.
config
.
assets
.
prefix
}
/ace-src-noconflict
"
)
ace
.
config
.
set
(
"
modePath
"
,
gon
.
relative_url_root
+
"
#{
Gitlab
::
Application
.
config
.
assets
.
prefix
}
/ace-src-noconflict
"
)
var
editor
=
ace
.
edit
(
"
editor
"
);
var
editor
=
ace
.
edit
(
"
editor
"
);
disableButtonIf
EmptyField
(
"
#commit_message
"
,
"
.js-commit-button
"
);
disableButtonIf
AnyEmptyField
(
$
(
'
.form-new-file
'
),
'
.form-control
'
,
'
.btn-create
'
)
$
(
"
.js-commit-button
"
).
click
(
function
(){
$
(
"
.js-commit-button
"
).
click
(
function
(){
$
(
"
#file-content
"
).
val
(
editor
.
getValue
());
$
(
"
#file-content
"
).
val
(
editor
.
getValue
());
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment