PHRAS-2978 fix on datepicker

This commit is contained in:
Harrys Ravalomanana
2020-03-20 18:13:29 +04:00
parent 026148c582
commit 3700b1a1ce
3 changed files with 18 additions and 18 deletions

View File

@@ -65,7 +65,7 @@
"normalize-css": "^2.1.0",
"npm": "^6.0.0",
"npm-modernizr": "^2.8.3",
"phraseanet-production-client": "0.34.150-d",
"phraseanet-production-client": "0.34.154-d",
"requirejs": "^2.3.5",
"tinymce": "^4.0.28",
"underscore": "^1.8.3",

View File

@@ -111,7 +111,8 @@
<input type="hidden" name="feedbackId" value={{ basket.getId}} />
<input type="hidden" name="feedbackDate" class="alternate" />
<input type="text" class="btn feed-datepicker" name="feedback-deadline" value="{{ dateExpired }}">
<button type="submit" class="submit hidden submit-validation" title="{{ 'workzone:feedback:update' | trans }}"><i class="fa fa-save"></i></button>
<button type="submit" class="submit submit-validation btn-not-shown" title="{{ 'workzone:feedback:update' | trans }}"><svg width="22" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="calendar-check" class="svg-inline--fa fa-calendar-check fa-w-14" role="img" viewBox="0 0 448 512"><path fill="currentColor" d="M436 160H12c-6.627 0-12-5.373-12-12v-36c0-26.51 21.49-48 48-48h48V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h128V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h48c26.51 0 48 21.49 48 48v36c0 6.627-5.373 12-12 12zM12 192h424c6.627 0 12 5.373 12 12v260c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V204c0-6.627 5.373-12 12-12zm333.296 95.947l-28.169-28.398c-4.667-4.705-12.265-4.736-16.97-.068L194.12 364.665l-45.98-46.352c-4.667-4.705-12.266-4.736-16.971-.068l-28.397 28.17c-4.705 4.667-4.736 12.265-.068 16.97l82.601 83.269c4.667 4.705 12.265 4.736 16.97.068l142.953-141.805c4.705-4.667 4.736-12.265.068-16.97z"/></svg></button>
<span class="cancel-date btn-not-shown"><i class="fa fa-times"></i></span>
</form>
<p class="message text-right" style="opacity: 0;transition: all 0.2s; color: green; display: block; ">{{ 'prod:workzone:basket:updated-message' | trans }}</p>
</div>
@@ -150,13 +151,10 @@
basket_id: formData[0].value,
date: formData[1].value
},
beforeSend: function() {
console.log(formData[0].value);
console.log(formData[1].value);
},
success: function (data) {
$('.message').css('opacity',1);
$('.submit-validation').addClass('hidden');
$('.submit-validation').addClass ('btn-not-shown');
$('.cancel-date').addClass ('btn-not-shown');
setTimeout(function(){ $('.message').css('opacity',0); }, 2000);
},
});
@@ -180,7 +178,13 @@
$(".feed-datepicker" ).datepicker( $.datepicker.regional[ 'default' ]);
$(".feed-datepicker" ).change(function() {
$('.submit-validation').removeClass('hidden');
$('.submit-validation').removeClass('btn-not-shown');
$('.cancel-date').removeClass('btn-not-shown');
});
$(".cancel-date" ).click(function() {
$('.cancel-date').removeClass('btn-not-shown');
$('.feed-datepicker').val('{{ dateExpired }}');
setTimeout(function(){ $('.cancel-date').addClass('btn-not-shown');$('.submit-validation').addClass('btn-not-shown'); }, 1000);
})
})

View File

@@ -5305,14 +5305,10 @@ jquery-simplecolorpicker@^0.3.1:
resolved "https://registry.yarnpkg.com/jquery-simplecolorpicker/-/jquery-simplecolorpicker-0.3.1.tgz#4f6befd380ab05470f585d5482e5180556e460eb"
integrity sha1-T2vv04CrBUcPWF1UguUYBVbkYOs=
"jquery-treeview@git+https://github.com/alchemy-fr/jquery-treeview.git#1e9e5a49d2875b878801e904cd08c2d25e85af1e":
version "1.4.2"
resolved "git+https://github.com/alchemy-fr/jquery-treeview.git#1e9e5a49d2875b878801e904cd08c2d25e85af1e"
"jquery-treeview@https://github.com/alchemy-fr/jquery-treeview.git":
"jquery-treeview@git+https://github.com/alchemy-fr/jquery-treeview.git", "jquery-treeview@git+https://github.com/alchemy-fr/jquery-treeview.git#1e9e5a49d2875b878801e904cd08c2d25e85af1e":
version "1.4.2"
uid "1e9e5a49d2875b878801e904cd08c2d25e85af1e"
resolved "https://github.com/alchemy-fr/jquery-treeview.git#1e9e5a49d2875b878801e904cd08c2d25e85af1e"
resolved "git+https://github.com/alchemy-fr/jquery-treeview.git#1e9e5a49d2875b878801e904cd08c2d25e85af1e"
jquery-ui-datepicker-with-i18n@^1.10.4:
version "1.10.4"
@@ -7581,10 +7577,10 @@ phraseanet-common@^0.4.5-d:
js-cookie "^2.1.0"
pym.js "^1.3.1"
phraseanet-production-client@0.34.150-d:
version "0.34.150-d"
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.150-d.tgz#625ea96c045719b405fe9b707b632b1290aca285"
integrity sha512-JrtPq6dCTCBxX6kGViXZj4Sc26PMFIaifT3PVD1WHLUCNd/U3nnHzpzKUgVC0ibqOj4aVwA8JW/oMilGEe3cmg==
phraseanet-production-client@0.34.154-d:
version "0.34.154-d"
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.154-d.tgz#6a8da739582092b119ebc9bfb13b579387ad5022"
integrity sha512-X6eMwS6RYRYYSaEZVyhiIWjpGe+ko6eqrxGXqUOUN/F/TjCWcFTFZDL/e7gN59vSnz4nmtVYV31tX+j/V/0Dtw==
dependencies:
"@mapbox/mapbox-gl-language" "^0.9.2"
"@turf/turf" "^5.1.6"