mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
prod component: removed jquery.vertical.buttonset lib
This commit is contained in:
@@ -36,7 +36,6 @@ gulp.task('build-prod', ['copy-prod-images', 'build-prod-css'], function(){
|
||||
config.paths.vendors + 'jquery-file-upload/js/jquery.iframe-transport.js',
|
||||
config.paths.vendors + 'jquery-file-upload/js/jquery.fileupload.js',
|
||||
config.paths.dist + 'include/jslibs/jquery.form.2.49.js',
|
||||
config.paths.dist + 'include/jslibs/jquery.vertical.buttonset.js',
|
||||
config.paths.src + 'prod/js/jquery.Selection.js',
|
||||
config.paths.src + 'prod/js/jquery.Edit.js',
|
||||
config.paths.src + 'prod/js/jquery.lists.js',
|
||||
@@ -47,7 +46,6 @@ gulp.task('build-prod', ['copy-prod-images', 'build-prod-css'], function(){
|
||||
config.paths.src + 'prod/js/jquery.WorkZone.js',
|
||||
config.paths.src + 'prod/js/jquery.Alerts.js',
|
||||
config.paths.src + 'prod/js/jquery.Upload.js',
|
||||
// config.paths.dist + 'include/jslibs/pixastic.custom.js', //@TODO double check usage
|
||||
config.paths.src + 'prod/js/ThumbExtractor.js',
|
||||
config.paths.src + 'prod/js/publicator.js',
|
||||
config.paths.dist + 'include/jslibs/jquery.sprintf.1.0.3.js',
|
||||
|
@@ -1,76 +0,0 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<script type="text/javascript" src="/assets/jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="/assets/jquery.ui/jquery-ui.js"></script>
|
||||
<script type="text/javascript" src="jquery.vertical.buttonset.js"></script>
|
||||
<link media="all" type="text/css" href="jquery-ui-1.10.3/css/dark-hive/jquery-ui-1.10.3.custom.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body{
|
||||
font-size:12px;
|
||||
}
|
||||
.ui-button-vertical{
|
||||
text-align:left;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('.menu').buttonsetv();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
Exemple 1
|
||||
</td>
|
||||
<td>
|
||||
Exemple 2
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<div class="menu">
|
||||
<div>
|
||||
<button class="default_action">default action</button>
|
||||
<button class="trigger">Select an action</button>
|
||||
</div>
|
||||
<div class="submenu" style="display:none;position:absolute;">
|
||||
<button>
|
||||
menu 1 with a great action
|
||||
</button>
|
||||
<button>
|
||||
menu 2 is simple
|
||||
</button>
|
||||
<button>
|
||||
menu 3 prout
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="menu">
|
||||
<button class="trigger">Select an action</button>
|
||||
<div class="submenu" style="display:none;position:absolute;">
|
||||
<button>
|
||||
menu 1 with a great action
|
||||
</button>
|
||||
<button>
|
||||
menu 2 is simple
|
||||
</button>
|
||||
<button>
|
||||
menu 3 prout
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@@ -1,95 +0,0 @@
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
|
||||
(function( $ ){
|
||||
|
||||
$.fn.buttonsetv = function() {
|
||||
$.each(this,function(i, $this){
|
||||
var default_action = $('.default_action', $this);
|
||||
var trigger = $( ".trigger", $this );
|
||||
if(default_action.length > 0)
|
||||
{
|
||||
default_action.parent().buttonset();
|
||||
|
||||
trigger
|
||||
.button({
|
||||
text:false,
|
||||
icons: {
|
||||
secondary: "ui-icon-triangle-1-s"
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger
|
||||
.button({
|
||||
icons: {
|
||||
secondary: "ui-icon-triangle-1-s"
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
var submenu = $('.submenu', $this);
|
||||
|
||||
|
||||
trigger.click(function(event) {
|
||||
|
||||
if(event.stopPropagation)
|
||||
event.stopPropagation();
|
||||
if(event.preventDefault)
|
||||
event.preventDefault();
|
||||
event.cancelBubble = true;
|
||||
|
||||
var todo = submenu.is(':visible');
|
||||
|
||||
$(document).trigger('click.menu');
|
||||
|
||||
if(!todo)
|
||||
{
|
||||
$(document).bind('click.menu', function(){
|
||||
submenu.hide();
|
||||
$(document).unbind('click.menu');
|
||||
});
|
||||
default_action.addClass('ui-corner-tl').removeClass('ui-corner-left');
|
||||
$(this).addClass('ui-corner-tr').removeClass('ui-corner-right');
|
||||
submenu.show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$(document).unbind('click.menu');
|
||||
default_action.removeClass('ui-corner-tl').addClass('ui-corner-left');
|
||||
$(this).removeClass('ui-corner-tr').addClass('ui-corner-right');
|
||||
submenu.hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(':radio, :checkbox, button, a', submenu).wrap('<div>');
|
||||
submenu.buttonset()
|
||||
|
||||
$('button:first', submenu).removeClass('ui-corner-left');//.css('border-top', 'none');
|
||||
$('button:last', submenu).removeClass('ui-corner-right').addClass('ui-corner-bottom');
|
||||
|
||||
var mw = 0;
|
||||
submenu.css('visibility','hidden').show();
|
||||
|
||||
$('button, a', submenu).each(function(index){
|
||||
w = $(this).width()+20;
|
||||
if (w > mw) mw = w;
|
||||
}).addClass('ui-button-vertical');
|
||||
|
||||
submenu.css('visibility','visible').hide();
|
||||
|
||||
$('button, a', submenu).each(function(index){
|
||||
$(this).width(mw);
|
||||
});
|
||||
});
|
||||
|
||||
return this;
|
||||
};
|
||||
})( jQuery );
|
Reference in New Issue
Block a user