mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 21:43:18 +00:00
fix tools actions with event delegation in basket workzone
fix bridge action href in basket workzone PHRAS-615 - fix tools actions positionning in basket workzone
This commit is contained in:
@@ -318,6 +318,7 @@
|
||||
var ratioImage = $(h).width() / $(h).height();
|
||||
|
||||
//position de l'image
|
||||
console.log('$eventTarget', $eventTarget)
|
||||
if ($eventTarget.offset().left > (v.x - $eventTarget.offset().left - $eventTarget.width())) {
|
||||
hor = 'gauche';
|
||||
wiH = $eventTarget.offset().left;
|
||||
|
@@ -1941,7 +1941,9 @@ function toolREFACTOR(datas, activeTab) {
|
||||
}
|
||||
|
||||
function activeIcons() {
|
||||
$('.TOOL_print_btn').on('click', function () {
|
||||
var $container = $('body');
|
||||
$container.on('click', '.TOOL_print_btn', function (e) {
|
||||
e.preventDefault();
|
||||
var value = "";
|
||||
|
||||
if ($(this).hasClass('results_window')) {
|
||||
@@ -1979,11 +1981,11 @@ function activeIcons() {
|
||||
alert(language.nodocselected);
|
||||
}
|
||||
});
|
||||
|
||||
$('.TOOL_bridge_btn').on('click', function (e) {
|
||||
$container.on('click', '.TOOL_bridge_btn', function (e) {
|
||||
e.preventDefault();
|
||||
var $button = $(this);
|
||||
var datas = {};
|
||||
var bridgeHref = $button.attr("href");
|
||||
|
||||
if ($button.hasClass('results_window')) {
|
||||
if (p4.Results.Selection.length() > 0)
|
||||
@@ -1991,6 +1993,7 @@ function activeIcons() {
|
||||
}
|
||||
else {
|
||||
if ($button.hasClass('basket_window')) {
|
||||
bridgeHref = $button.attr("data-href");
|
||||
if (p4.WorkZone.Selection.length() > 0)
|
||||
datas.lst = p4.WorkZone.Selection.serialize();
|
||||
else
|
||||
@@ -2002,6 +2005,7 @@ function activeIcons() {
|
||||
}
|
||||
else {
|
||||
if ($button.hasClass('story_window')) {
|
||||
bridgeHref = $button.attr("data-href");
|
||||
if (p4.WorkZone.Selection.length() > 0) {
|
||||
datas.lst = p4.WorkZone.Selection.serialize();
|
||||
}
|
||||
@@ -2014,15 +2018,15 @@ function activeIcons() {
|
||||
}
|
||||
|
||||
if (datas.ssel || datas.lst || datas.story) {
|
||||
init_publicator($button.attr("href"), datas);
|
||||
init_publicator(bridgeHref, datas);
|
||||
}
|
||||
else {
|
||||
alert(language.nodocselected);
|
||||
}
|
||||
});
|
||||
|
||||
$container.on('click', '.TOOL_trash_btn', function () {
|
||||
|
||||
$('.TOOL_trash_btn').on('click', function () {
|
||||
var type = "";
|
||||
var el = false;
|
||||
|
||||
@@ -2058,8 +2062,8 @@ function activeIcons() {
|
||||
alert(language.nodocselected);
|
||||
}
|
||||
});
|
||||
$container.on('click', '.TOOL_ppen_btn', function () {
|
||||
|
||||
$('.TOOL_ppen_btn').on('click', function () {
|
||||
var value = "";
|
||||
var type = "";
|
||||
|
||||
@@ -2107,8 +2111,7 @@ function activeIcons() {
|
||||
alert(language.nodocselected);
|
||||
}
|
||||
});
|
||||
|
||||
$('.TOOL_publish_btn').on('click', function () {
|
||||
$container.on('click', '.TOOL_publish_btn', function () {
|
||||
var value = "";
|
||||
var type = "";
|
||||
|
||||
@@ -2188,7 +2191,8 @@ function activeIcons() {
|
||||
return;
|
||||
}
|
||||
|
||||
$('.TOOL_chgcoll_btn').on('click', function () {
|
||||
|
||||
$container.on('click', '.TOOL_chgcoll_btn', function () {
|
||||
var value = {};
|
||||
|
||||
if ($(this).hasClass('results_window')) {
|
||||
@@ -2229,7 +2233,7 @@ function activeIcons() {
|
||||
alert(language.nodocselected);
|
||||
});
|
||||
|
||||
$('.TOOL_chgstatus_btn').on('click', function () {
|
||||
$container.on('click', '.TOOL_chgstatus_btn', function () {
|
||||
var params = {};
|
||||
var $this = $(this);
|
||||
|
||||
@@ -2267,7 +2271,7 @@ function activeIcons() {
|
||||
}
|
||||
});
|
||||
|
||||
$('.TOOL_pushdoc_btn').on('click', function () {
|
||||
$container.on('click', '.TOOL_pushdoc_btn', function () {
|
||||
var value = "", type = "", sstt_id = "", story = "";
|
||||
if ($(this).hasClass('results_window')) {
|
||||
if (p4.Results.Selection.length() > 0)
|
||||
@@ -2304,8 +2308,7 @@ function activeIcons() {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('.TOOL_feedback_btn').on('click', function () {
|
||||
$container.on('click', '.TOOL_feedback_btn', function () {
|
||||
var value = "", type = "", sstt_id = "", story = '';
|
||||
if ($(this).hasClass('results_window')) {
|
||||
if (p4.Results.Selection.length() > 0)
|
||||
@@ -2342,8 +2345,7 @@ function activeIcons() {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('.TOOL_imgtools_btn').on('click', function () {
|
||||
$container.on('click', '.TOOL_imgtools_btn', function () {
|
||||
var datas = {};
|
||||
|
||||
if ($(this).hasClass('results_window')) {
|
||||
@@ -2382,8 +2384,7 @@ function activeIcons() {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('.TOOL_disktt_btn').on('click', function () {
|
||||
$container.on('click', '.TOOL_disktt_btn', function () {
|
||||
var datas = {};
|
||||
|
||||
if ($(this).hasClass('results_window')) {
|
||||
|
@@ -60,17 +60,14 @@
|
||||
}
|
||||
.SSTT {
|
||||
&.active {
|
||||
border: 1px solid #b1b1b1;
|
||||
&.ui-corner-top {
|
||||
border: none;
|
||||
border-top: 1px solid $mediumBorderColor;
|
||||
top: 0;
|
||||
background-color: $mediumBackgroundColor;
|
||||
}
|
||||
}
|
||||
&.grouping {
|
||||
&.active {
|
||||
// border: 1px solid #2f4a6f;
|
||||
&.ui-corner-top {
|
||||
border-bottom: none;
|
||||
}
|
||||
@@ -167,6 +164,9 @@
|
||||
right: 0;
|
||||
z-index: 15;
|
||||
vertical-align: middle;
|
||||
.WorkZoneElementRemover {
|
||||
padding: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.CHIM.diapo .bottom span, .CHIM.diapo .bottom img {
|
||||
|
@@ -141,7 +141,7 @@
|
||||
display: none;
|
||||
}
|
||||
.tools {
|
||||
//text-align: center;
|
||||
padding: 7px 0 7px 0;
|
||||
text-align: left !important;
|
||||
button {
|
||||
background-color: transparent;
|
||||
@@ -149,7 +149,7 @@
|
||||
width: 16px;
|
||||
height: 22px;
|
||||
cursor: pointer;
|
||||
padding: 0px;
|
||||
padding: 0;
|
||||
}
|
||||
label {
|
||||
display: inline;
|
||||
|
@@ -41,7 +41,7 @@
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right('bas_chupub') %}
|
||||
<button class="ui-corner-all TOOL_bridge_btn basket_window" title="{{ 'action : bridge' | trans }}">
|
||||
<button class="ui-corner-all TOOL_bridge_btn basket_window" title="{{ 'action : bridge' | trans }}" data-href="{{ path("prod_bridge_manager") }}">
|
||||
<img src="/assets/common/images/icons/door.png"/>
|
||||
</button>
|
||||
<button class="ui-corner-all TOOL_publish_btn basket_window" title="{{ 'action : publier' | trans }}">
|
||||
|
@@ -309,7 +309,7 @@
|
||||
href="#"
|
||||
{% endif %}
|
||||
class="WorkZoneElementRemover {{ wz_scope }}" title="{{ 'delete' | trans }}" >
|
||||
X
|
||||
<i class="icon-remove"></i>
|
||||
</a>
|
||||
{% if app['settings'].getUserSetting(app.getAuthenticatedUser(), 'basket_caption_display') == '1' %}
|
||||
<div class="captionRolloverTips" tooltipsrc="{{ path('prod_tooltip_caption', { 'sbas_id' : record.get_sbas_id(), 'record_id' : record.get_record_id(), 'context' : 'basket', 'number' : record.getNumber() }) }}"></div>
|
||||
|
@@ -41,7 +41,7 @@
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if app.getAclForUser(app.getAuthenticatedUser()).has_right('bas_chupub') %}
|
||||
<button class="ui-corner-all TOOL_bridge_btn story_window" title="{{ 'action : bridge' | trans }}">
|
||||
<button class="ui-corner-all TOOL_bridge_btn story_window" title="{{ 'action : bridge' | trans }}" data-href="{{ path("prod_bridge_manager") }}">
|
||||
<img src="/assets/common/images/icons/door.png"/>
|
||||
</button>
|
||||
<button class="ui-corner-all TOOL_publish_btn story_window" title="{{ 'action : publier' | trans }}">
|
||||
|
Reference in New Issue
Block a user