View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
11977Feature requestsTheme editorpublic2018-04-06 11:48
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynoneSeverityfeature 
Status closedResolutionfixed 
Summary11977: Don't replace alert() javascript function
Description

Think it's a bad idea to replace alert() function (and it's broken currently : you can not do alert(1) + alert(2) : you see only the last one)

Additional Information

LS usage of a new function sendAlert

Core package use alert here
template can use anything else

Tagsanswers_html
Bug heat2
Story point estimate
Users affected %

Relationships

related to 11784 closedDenisChenu Replace alert + confirm in core system (?) 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2016-12-02 18:02

developer   ~42321

Last edited: 2016-12-02 18:03

(12:58:52) Deusdeorum: who made the new default templates btw? did not know it is possible to style the javascript alert pop up. very nice
(12:59:45) Lartza: I don't think it's an alert box, you can't style those
(13:00:15) ollehar: correct
(13:00:20) ollehar: alert() is overridden
(13:00:24) Deusdeorum: ah!
(13:00:25) ollehar: maybe not such a good idea...
(13:00:27) ollehar: :|
(13:00:31) ollehar: :-|
(13:01:21) Lartza: Where are there popups in limesurvey?
....
(14:26:27) shnoulle: (13:00:25) ollehar: maybe not such a good idea..
(14:26:29) friedrich [] a rejoint le salon.
(14:26:44) shnoulle: Yes right, think we must use LSalert function
(14:27:05) shnoulle: core do LSamert(text,title){ alert(text)}
(14:27:12) shnoulle: But template can manage it :)
(14:27:32) Deusdeorum: seems nice but why is not a good idea to override a ugly looking alert box? :)
(14:27:40) ollehar: shnoulle: LS.alert
(14:27:42) shnoulle: I make a feature for answers html when i have time
(14:27:55) ollehar: anything is better than to override a js function, really.
(14:27:55) shnoulle: yes : or anythinh else
(14:28:10) shnoulle: (14:27:55) ollehar: anything is better than to override a js function, really. yes
(14:28:14) shnoulle: +1 :)
(14:28:16) ollehar: Deusdeorum: expectiations
(14:28:20) ollehar: consistency
(14:28:22) shnoulle: Same with console.log .....
(14:28:25) ollehar: sure
(14:28:34) Deusdeorum: ah okey
(14:28:52) shnoulle: Last time : i work 1 hour with console=.log and didn't understand what it don't happen ......
(14:28:57) ollehar: and if someone for some reason decides to use the original alert, he/she can't

DenisChenu

DenisChenu

2016-12-02 18:16

developer   ~42322

Done in https://github.com/LimeSurvey/LimeSurvey/commit/ba5d184776451087a1eb6efef35f9e05c53e4451

Can easily reversed by uncomment https://github.com/LimeSurvey/LimeSurvey/commit/ba5d184776451087a1eb6efef35f9e05c53e4451#diff-7a51e41b79e5ef4131e9fc80819ff882R113

Still : have a alertSurveyDialog function to just replace 'limesurvey' alert seems to be good.

DenisChenu

DenisChenu

2016-12-06 08:35

developer   ~42385

Fixed + improved

DenisChenu

DenisChenu

2016-12-06 08:37

developer   ~42386

Javascript functions

  • confirmSurveyDialog(text,title,submits)
  • alertSurveyDialog(text,title)

https://github.com/LimeSurvey/LimeSurvey/blob/develop/application/core/packages/limesurvey/survey.js

Related Changesets

LimeSurvey: develop ba5d1847

2016-12-02 18:13:14

DenisChenu

Details Diff
Dev: 11977: Don't replace alert() javascript function Affected Issues
11977
mod - application/core/packages/limesurvey/survey.js Diff File
mod - application/core/packages/questions/ranking/ranking.js Diff File
mod - templates/default/scripts/template.js Diff File

Issue History

Date Modified Username Field Change
2016-12-02 15:01 DenisChenu New Issue
2016-12-02 15:01 DenisChenu Status new => assigned
2016-12-02 15:01 DenisChenu Assigned To => DenisChenu
2016-12-02 15:01 DenisChenu Tag Attached: answers_html
2016-12-02 18:02 DenisChenu Note Added: 42321
2016-12-02 18:03 DenisChenu Note Edited: 42321
2016-12-02 18:14 DenisChenu Changeset attached => LimeSurvey develop ba5d1847
2016-12-02 18:16 DenisChenu Assigned To DenisChenu =>
2016-12-02 18:16 DenisChenu Status assigned => feedback
2016-12-02 18:16 DenisChenu Note Added: 42322
2016-12-06 08:35 DenisChenu Assigned To => DenisChenu
2016-12-06 08:35 DenisChenu Status feedback => resolved
2016-12-06 08:35 DenisChenu Resolution open => fixed
2016-12-06 08:35 DenisChenu Fixed in Version => 3.0
2016-12-06 08:35 DenisChenu Note Added: 42385
2016-12-06 08:37 DenisChenu Status resolved => feedback
2016-12-06 08:37 DenisChenu Resolution fixed => reopened
2016-12-06 08:37 DenisChenu Note Added: 42386
2016-12-06 08:37 DenisChenu Status feedback => resolved
2016-12-06 08:37 DenisChenu Resolution reopened => fixed
2016-12-10 14:22 DenisChenu Relationship added related to 11784
2018-04-06 11:48 markusfluer Status resolved => closed