Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
c5bf388e
Commit
c5bf388e
authored
Mar 12, 2015
by
Marc Duez
Browse files
menu.js : move menu in it from main.js to menu.js
parent
2a5cc309
Changes
1
Hide whitespace changes
Inline
Side-by-side
browser/js/menu.js
View file @
c5bf388e
...
...
@@ -21,6 +21,49 @@
* along with "Vidjil". If not, see <http://www.gnu.org/licenses/>
*/
function
initMenu
()
{
if
(
typeof
config
!=
'
undefined
'
)
{
if
(
config
.
file_menu
&&
config
.
file_menu
.
file
.
length
!=
0
){
//detect if files are available
$
.
ajax
({
type
:
"
POST
"
,
timeout
:
5000
,
crossDomain
:
true
,
url
:
config
.
file_menu
.
path
+
config
.
file_menu
.
file
[
0
],
success
:
function
(
result
)
{
$
(
'
#static_file_menu
'
).
css
(
"
display
"
,
""
)
var
demo_file
=
document
.
getElementById
(
"
fileSelector
"
).
firstChild
for
(
var
i
=
0
;
i
<
config
.
file_menu
.
file
.
length
;
i
++
)
{
(
function
(
i
)
{
var
a
=
document
.
createElement
(
'
a
'
);
a
.
className
=
"
buttonSelector
"
a
.
onclick
=
function
()
{
m
.
loadDataUrl
(
config
.
file_menu
.
path
+
config
.
file_menu
.
file
[
i
])
}
a
.
appendChild
(
document
.
createTextNode
(
config
.
file_menu
.
file
[
i
]))
demo_file
.
appendChild
(
a
);
})(
i
)
}
},
error
:
function
()
{
myConsole
.
flash
(
"
Files are not available
"
,
1
)
}
});
}
if
(
typeof
config
.
use_database
!=
'
undefined
'
&&
config
.
use_database
){
$
(
"
#db_menu
"
).
css
(
"
display
"
,
""
);
}
}
}
function
loadData
()
{
myConsole
.
closePopupMsg
()
...
...
Write
Preview
Supports
Markdown
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