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
Léo-Paul Géneau
gitlab-ce
Commits
6c4d6117
Commit
6c4d6117
authored
Apr 10, 2017
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove IIFEs in boards_bundle.js
parent
84da388d
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1232 additions
and
1269 deletions
+1232
-1269
app/assets/javascripts/boards/components/board.js
app/assets/javascripts/boards/components/board.js
+83
-85
app/assets/javascripts/boards/components/board_delete.js
app/assets/javascripts/boards/components/board_delete.js
+13
-15
app/assets/javascripts/boards/components/board_sidebar.js
app/assets/javascripts/boards/components/board_sidebar.js
+55
-57
app/assets/javascripts/boards/components/issue_card_inner.js
app/assets/javascripts/boards/components/issue_card_inner.js
+122
-124
app/assets/javascripts/boards/components/modal/empty_state.js
...assets/javascripts/boards/components/modal/empty_state.js
+59
-61
app/assets/javascripts/boards/components/modal/footer.js
app/assets/javascripts/boards/components/modal/footer.js
+62
-64
app/assets/javascripts/boards/components/modal/header.js
app/assets/javascripts/boards/components/modal/header.js
+64
-66
app/assets/javascripts/boards/components/modal/index.js
app/assets/javascripts/boards/components/modal/index.js
+135
-137
app/assets/javascripts/boards/components/modal/list.js
app/assets/javascripts/boards/components/modal/list.js
+133
-135
app/assets/javascripts/boards/components/modal/lists_dropdown.js
...ets/javascripts/boards/components/modal/lists_dropdown.js
+50
-52
app/assets/javascripts/boards/components/modal/tabs.js
app/assets/javascripts/boards/components/modal/tabs.js
+42
-44
app/assets/javascripts/boards/components/new_list_dropdown.js
...assets/javascripts/boards/components/new_list_dropdown.js
+59
-61
app/assets/javascripts/boards/components/sidebar/remove_issue.js
...ets/javascripts/boards/components/sidebar/remove_issue.js
+48
-50
app/assets/javascripts/boards/mixins/modal_mixins.js
app/assets/javascripts/boards/mixins/modal_mixins.js
+10
-12
app/assets/javascripts/boards/mixins/sortable_default_options.js
...ets/javascripts/boards/mixins/sortable_default_options.js
+29
-31
app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/boards/stores/boards_store.js
+107
-109
app/assets/javascripts/boards/stores/modal_store.js
app/assets/javascripts/boards/stores/modal_store.js
+77
-79
app/assets/javascripts/lib/utils/url_utility.js
app/assets/javascripts/lib/utils/url_utility.js
+84
-87
No files found.
app/assets/javascripts/boards/components/board.js
View file @
6c4d6117
...
...
@@ -7,13 +7,12 @@ import boardBlankState from './board_blank_state';
require
(
'
./board_delete
'
);
require
(
'
./board_list
'
);
(()
=>
{
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
gl
.
issueBoards
.
Board
=
Vue
.
extend
({
gl
.
issueBoards
.
Board
=
Vue
.
extend
({
template
:
'
#js-board-template
'
,
components
:
{
boardList
,
...
...
@@ -102,5 +101,4 @@ require('./board_list');
this
.
sortable
=
Sortable
.
create
(
this
.
$el
.
parentNode
,
this
.
sortableOptions
);
},
});
})();
});
app/assets/javascripts/boards/components/board_delete.js
View file @
6c4d6117
...
...
@@ -2,11 +2,10 @@
import
Vue
from
'
vue
'
;
(()
=>
{
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
gl
.
issueBoards
.
BoardDelete
=
Vue
.
extend
({
gl
.
issueBoards
.
BoardDelete
=
Vue
.
extend
({
props
:
{
list
:
Object
},
...
...
@@ -19,5 +18,4 @@ import Vue from 'vue';
}
}
}
});
})();
});
app/assets/javascripts/boards/components/board_sidebar.js
View file @
6c4d6117
...
...
@@ -8,13 +8,12 @@ import Vue from 'vue';
require
(
'
./sidebar/remove_issue
'
);
(()
=>
{
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
gl
.
issueBoards
.
BoardSidebar
=
Vue
.
extend
({
gl
.
issueBoards
.
BoardSidebar
=
Vue
.
extend
({
props
:
{
currentUser
:
Object
},
...
...
@@ -69,5 +68,4 @@ require('./sidebar/remove_issue');
components
:
{
removeBtn
:
gl
.
issueBoards
.
RemoveIssueBtn
,
},
});
})();
});
app/assets/javascripts/boards/components/issue_card_inner.js
View file @
6c4d6117
import
Vue
from
'
vue
'
;
import
eventHub
from
'
../eventhub
'
;
(()
=>
{
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
gl
.
issueBoards
.
IssueCardInner
=
Vue
.
extend
({
gl
.
issueBoards
.
IssueCardInner
=
Vue
.
extend
({
props
:
{
issue
:
{
type
:
Object
,
...
...
@@ -137,5 +136,4 @@ import eventHub from '../eventhub';
</div>
</div>
`
,
});
})();
});
app/assets/javascripts/boards/components/modal/empty_state.js
View file @
6c4d6117
import
Vue
from
'
vue
'
;
(()
=>
{
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
gl
.
issueBoards
.
ModalEmptyState
=
Vue
.
extend
({
gl
.
issueBoards
.
ModalEmptyState
=
Vue
.
extend
({
mixins
:
[
gl
.
issueBoards
.
ModalMixins
],
data
()
{
return
ModalStore
.
store
;
...
...
@@ -67,5 +66,4 @@ import Vue from 'vue';
</div>
</section>
`
,
});
})();
});
app/assets/javascripts/boards/components/modal/footer.js
View file @
6c4d6117
...
...
@@ -5,10 +5,9 @@ import Vue from 'vue';
require
(
'
./lists_dropdown
'
);
(()
=>
{
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
gl
.
issueBoards
.
ModalFooter
=
Vue
.
extend
({
gl
.
issueBoards
.
ModalFooter
=
Vue
.
extend
({
mixins
:
[
gl
.
issueBoards
.
ModalMixins
],
data
()
{
return
{
...
...
@@ -80,5 +79,4 @@ require('./lists_dropdown');
</button>
</footer>
`
,
});
})();
});
app/assets/javascripts/boards/components/modal/header.js
View file @
6c4d6117
...
...
@@ -3,10 +3,9 @@ import modalFilters from './filters';
require
(
'
./tabs
'
);
(()
=>
{
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
gl
.
issueBoards
.
ModalHeader
=
Vue
.
extend
({
gl
.
issueBoards
.
ModalHeader
=
Vue
.
extend
({
mixins
:
[
gl
.
issueBoards
.
ModalMixins
],
props
:
{
projectId
:
{
...
...
@@ -78,5 +77,4 @@ require('./tabs');
</div>
</div>
`
,
});
})();
});
app/assets/javascripts/boards/components/modal/index.js
View file @
6c4d6117
...
...
@@ -8,10 +8,9 @@ require('./list');
require
(
'
./footer
'
);
require
(
'
./empty_state
'
);
(()
=>
{
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
gl
.
issueBoards
.
IssuesModal
=
Vue
.
extend
({
gl
.
issueBoards
.
IssuesModal
=
Vue
.
extend
({
props
:
{
blankStateImage
:
{
type
:
String
,
...
...
@@ -163,5 +162,4 @@ require('./empty_state');
</div>
</div>
`
,
});
})();
});
app/assets/javascripts/boards/components/modal/list.js
View file @
6c4d6117
...
...
@@ -3,10 +3,9 @@
import
Vue
from
'
vue
'
;
(()
=>
{
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
gl
.
issueBoards
.
ModalList
=
Vue
.
extend
({
gl
.
issueBoards
.
ModalList
=
Vue
.
extend
({
props
:
{
issueLinkBase
:
{
type
:
String
,
...
...
@@ -157,5 +156,4 @@ import Vue from 'vue';
</div>
</section>
`
,
});
})();
});
app/assets/javascripts/boards/components/modal/lists_dropdown.js
View file @
6c4d6117
import
Vue
from
'
vue
'
;
(()
=>
{
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
gl
.
issueBoards
.
ModalFooterListsDropdown
=
Vue
.
extend
({
gl
.
issueBoards
.
ModalFooterListsDropdown
=
Vue
.
extend
({
data
()
{
return
{
modal
:
ModalStore
.
store
,
...
...
@@ -53,5 +52,4 @@ import Vue from 'vue';
</div>
</div>
`
,
});
})();
});
app/assets/javascripts/boards/components/modal/tabs.js
View file @
6c4d6117
import
Vue
from
'
vue
'
;
(()
=>
{
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
gl
.
issueBoards
.
ModalTabs
=
Vue
.
extend
({
gl
.
issueBoards
.
ModalTabs
=
Vue
.
extend
({
mixins
:
[
gl
.
issueBoards
.
ModalMixins
],
data
()
{
return
ModalStore
.
store
;
...
...
@@ -44,5 +43,4 @@ import Vue from 'vue';
</ul>
</div>
`
,
});
})();
});
app/assets/javascripts/boards/components/new_list_dropdown.js
View file @
6c4d6117
/* eslint-disable comma-dangle, func-names, no-new, space-before-function-paren, one-var */
(()
=>
{
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
$
(
document
).
off
(
'
created.label
'
).
on
(
'
created.label
'
,
(
e
,
label
)
=>
{
$
(
document
).
off
(
'
created.label
'
).
on
(
'
created.label
'
,
(
e
,
label
)
=>
{
Store
.
new
({
title
:
label
.
title
,
position
:
Store
.
state
.
lists
.
length
-
2
,
...
...
@@ -17,9 +16,9 @@
color
:
label
.
color
}
});
});
});
gl
.
issueBoards
.
newListDropdownInit
=
()
=>
{
gl
.
issueBoards
.
newListDropdownInit
=
()
=>
{
$
(
'
.js-new-board-list
'
).
each
(
function
()
{
const
$this
=
$
(
this
);
new
gl
.
CreateLabelDropdown
(
$this
.
closest
(
'
.dropdown
'
).
find
(
'
.dropdown-new-label
'
),
$this
.
data
(
'
namespace-path
'
),
$this
.
data
(
'
project-path
'
));
...
...
@@ -72,5 +71,4 @@
}
});
});
};
})();
};
app/assets/javascripts/boards/components/sidebar/remove_issue.js
View file @
6c4d6117
...
...
@@ -3,13 +3,12 @@
import
Vue
from
'
vue
'
;
(()
=>
{
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
const
Store
=
gl
.
issueBoards
.
BoardsStore
;
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
gl
.
issueBoards
.
RemoveIssueBtn
=
Vue
.
extend
({
gl
.
issueBoards
.
RemoveIssueBtn
=
Vue
.
extend
({
props
:
{
issue
:
{
type
:
Object
,
...
...
@@ -57,5 +56,4 @@ import Vue from 'vue';
</button>
</div>
`
,
});
})();
});
app/assets/javascripts/boards/mixins/modal_mixins.js
View file @
6c4d6117
(()
=>
{
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
const
ModalStore
=
gl
.
issueBoards
.
ModalStore
;
gl
.
issueBoards
.
ModalMixins
=
{
gl
.
issueBoards
.
ModalMixins
=
{
methods
:
{
toggleModal
(
toggle
)
{
ModalStore
.
store
.
showAddIssuesModal
=
toggle
;
...
...
@@ -10,5 +9,4 @@
ModalStore
.
store
.
activeTab
=
tab
;
},
},
};
})();
};
app/assets/javascripts/boards/mixins/sortable_default_options.js
View file @
6c4d6117
/* eslint-disable no-unused-vars, no-mixed-operators, comma-dangle */
/* global DocumentTouch */
((
w
)
=>
{
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
gl
.
issueBoards
.
onStart
=
()
=>
{
gl
.
issueBoards
.
onStart
=
()
=>
{
$
(
'
.has-tooltip
'
).
tooltip
(
'
hide
'
)
.
tooltip
(
'
disable
'
);
document
.
body
.
classList
.
add
(
'
is-dragging
'
);
};
};
gl
.
issueBoards
.
onEnd
=
()
=>
{
gl
.
issueBoards
.
onEnd
=
()
=>
{
$
(
'
.has-tooltip
'
).
tooltip
(
'
enable
'
);
document
.
body
.
classList
.
remove
(
'
is-dragging
'
);
};
};
gl
.
issueBoards
.
touchEnabled
=
(
'
ontouchstart
'
in
window
)
||
window
.
DocumentTouch
&&
document
instanceof
DocumentTouch
;
gl
.
issueBoards
.
touchEnabled
=
(
'
ontouchstart
'
in
window
)
||
window
.
DocumentTouch
&&
document
instanceof
DocumentTouch
;
gl
.
issueBoards
.
getBoardSortableDefaultOptions
=
(
obj
)
=>
{
gl
.
issueBoards
.
getBoardSortableDefaultOptions
=
(
obj
)
=>
{
const
defaultSortOptions
=
{
animation
:
200
,
forceFallback
:
true
,
...
...
@@ -35,5 +34,4 @@
Object
.
keys
(
obj
).
forEach
((
key
)
=>
{
defaultSortOptions
[
key
]
=
obj
[
key
];
});
return
defaultSortOptions
;
};
})(
window
);
};
app/assets/javascripts/boards/stores/boards_store.js
View file @
6c4d6117
...
...
@@ -3,11 +3,10 @@
import
Cookies
from
'
js-cookie
'
;
(()
=>
{
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
gl
.
issueBoards
.
BoardsStore
=
{
gl
.
issueBoards
.
BoardsStore
=
{
disabled
:
false
,
filter
:
{
path
:
''
,
...
...
@@ -123,5 +122,4 @@ import Cookies from 'js-cookie';
updateFiltersUrl
()
{
history
.
pushState
(
null
,
null
,
`?
${
this
.
filter
.
path
}
`
);
}
};
})();
};
app/assets/javascripts/boards/stores/modal_store.js
View file @
6c4d6117
(()
=>
{
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
class
ModalStore
{
class
ModalStore
{
constructor
()
{
this
.
store
=
{
columns
:
3
,
...
...
@@ -94,7 +93,6 @@
return
this
.
store
.
selectedIssues
.
filter
(
filteredIssue
=>
filteredIssue
.
id
===
issue
.
id
)[
0
];
}
}
}
gl
.
issueBoards
.
ModalStore
=
new
ModalStore
();
})();
gl
.
issueBoards
.
ModalStore
=
new
ModalStore
();
app/assets/javascripts/lib/utils/url_utility.js
View file @
6c4d6117
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-param-reassign, no-cond-assign, one-var, one-var-declaration-per-line, no-void, guard-for-in, no-restricted-syntax, prefer-template, quotes, max-len */
(
function
()
{
(
function
(
w
)
{
var
base
;
if
(
w
.
gl
==
null
)
{
var
base
;
var
w
=
window
;
if
(
w
.
gl
==
null
)
{
w
.
gl
=
{};
}
if
((
base
=
w
.
gl
).
utils
==
null
)
{
}
if
((
base
=
w
.
gl
).
utils
==
null
)
{
base
.
utils
=
{};
}
// Returns an array containing the value(s) of the
// of the key passed as an argument
w
.
gl
.
utils
.
getParameterValues
=
function
(
sParam
)
{
}
// Returns an array containing the value(s) of the
// of the key passed as an argument
w
.
gl
.
utils
.
getParameterValues
=
function
(
sParam
)
{
var
i
,
sPageURL
,
sParameterName
,
sURLVariables
,
values
;
sPageURL
=
decodeURIComponent
(
window
.
location
.
search
.
substring
(
1
));
sURLVariables
=
sPageURL
.
split
(
'
&
'
);
...
...
@@ -25,10 +24,10 @@
i
+=
1
;
}
return
values
;
};
// @param {Object} params - url keys and value to merge
// @param {String} url
w
.
gl
.
utils
.
mergeUrlParams
=
function
(
params
,
url
)
{
};
// @param {Object} params - url keys and value to merge
// @param {String} url
w
.
gl
.
utils
.
mergeUrlParams
=
function
(
params
,
url
)
{
var
lastChar
,
newUrl
,
paramName
,
paramValue
,
pattern
;
newUrl
=
decodeURIComponent
(
url
);
for
(
paramName
in
params
)
{
...
...
@@ -48,9 +47,9 @@
newUrl
=
newUrl
.
slice
(
0
,
-
1
);
}
return
newUrl
;
};
// removes parameter query string from url. returns the modified url
w
.
gl
.
utils
.
removeParamQueryString
=
function
(
url
,
param
)
{
};
// removes parameter query string from url. returns the modified url
w
.
gl
.
utils
.
removeParamQueryString
=
function
(
url
,
param
)
{
var
urlVariables
,
variables
;
url
=
decodeURIComponent
(
url
);
urlVariables
=
url
.
split
(
'
&
'
);
...
...
@@ -65,15 +64,15 @@
}
return
results
;
})()).
join
(
'
&
'
);
};
w
.
gl
.
utils
.
removeParams
=
(
params
)
=>
{
};
w
.
gl
.
utils
.
removeParams
=
(
params
)
=>
{
const
url
=
new
URL
(
window
.
location
.
href
);
params
.
forEach
((
param
)
=>
{
url
.
search
=
w
.
gl
.
utils
.
removeParamQueryString
(
url
.
search
,
param
);
});
return
url
.
href
;
};
w
.
gl
.
utils
.
getLocationHash
=
function
(
url
)
{
};
w
.
gl
.
utils
.
getLocationHash
=
function
(
url
)
{
var
hashIndex
;
if
(
typeof
url
===
'
undefined
'
)
{
// Note: We can't use window.location.hash here because it's
...
...
@@ -82,12 +81,10 @@
}
hashIndex
=
url
.
indexOf
(
'
#
'
);
return
hashIndex
===
-
1
?
null
:
url
.
substring
(
hashIndex
+
1
);
};
};
w
.
gl
.
utils
.
refreshCurrentPage
=
()
=>
gl
.
utils
.
visitUrl
(
document
.
location
.
href
);
w
.
gl
.
utils
.
refreshCurrentPage
=
()
=>
gl
.
utils
.
visitUrl
(
document
.
location
.
href
);
w
.
gl
.
utils
.
visitUrl
=
(
url
)
=>
{
w
.
gl
.
utils
.
visitUrl
=
(
url
)
=>
{
document
.
location
.
href
=
url
;
};
})(
window
);
}).
call
(
window
);
};
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