Added momentjs locale switching

This commit is contained in:
Felipe Martín 2015-09-08 19:57:37 +02:00
parent 04a249614d
commit a66e54798f
2 changed files with 13 additions and 10 deletions

View File

@ -1,23 +1,25 @@
// Handle data-href
$('[data-href]').on('click', function(event) {
location.href = $(this).attr('data-href');
location.href = $(this).attr('data-href');
});
// Enable dropdowns
$('.dropdown').dropdown({transition: 'drop', on: 'hover'});
$('.toggle-menu').on('click', function() {
$('.responsive-menu').toggle(200);
$('.responsive-menu').toggle(200);
})
$(function(){
$('[data-component="silbingPopup"]').popup({
inline: true,
position: 'left center'
});
$('[data-component="silbingPopup"]').popup({
inline: true,
position: 'left center'
});
$('.right.menu.open').on("click",function(e){
e.preventDefault();
$('.ui.vertical.menu').toggle();
});
$('.right.menu.open').on("click",function(e){
e.preventDefault();
$('.ui.vertical.menu').toggle();
});
moment.locale(document.querySelector('html').getAttribute('lang'));
});

View File

@ -9,6 +9,7 @@ gulp.task('scripts', function() {
'bower_components/jquery/dist/jquery.js',
'bower_components/money/money.js',
'bower_components/moment/moment.js',
'bower_components/moment/locale/es.js',
'amiibofindr/static/semantic/semantic.js',
'amiibofindr/static/app/simpleViews.js',
'amiibofindr/static/app/global.js',