FlightGear wiki talk:Instant-Refs: Difference between revisions

Jump to navigation Jump to search
m
Line 100: Line 100:
see [[Understanding Forward Compatibility]] for examples
see [[Understanding Forward Compatibility]] for examples
: {{done}} --[[User:Bigstones|Bigstones]] ([[User talk:Bigstones|talk]]) 15:13, 17 June 2014 (UTC)
: {{done}} --[[User:Bigstones|Bigstones]] ([[User talk:Bigstones|talk]]) 15:13, 17 June 2014 (UTC)
=== Chopped strings and stripped \n's: we need an alternative output ===
At first, the limitation of the alert dialog was only on the length of the text. Now radi reports that Firefox strips the newlines (as in \n) making the string hardly readable, and I can confirm this on Iceweasel (Debian's re-branded Firefox). It seems that the most flexible way out of this is a superimposed div. I made some experiments, however it seems that all of this could be handled easier through some library like jQuery. I think I don't even know how to include a library inside a JS script. To escape the html code to show it in the html body (like br's and others) a nice and easy solution is [http://stackoverflow.com/a/12034334 here].
:: I agree that we should explore adding alternate OUTPUT methods, probably using jQuery. I experimented with that a while ago, and adding external dependencies/scripts should be a no-brainer once we modify the document to inject additional script tags [http://stackoverflow.com/questions/10113366/load-jquery-with-javascript-and-use-jquery][http://stackoverflow.com/questions/11212809/load-jquery-dynamically][http://www.sitepoint.com/dynamically-load-jquery-library-javascript/]. That way, we could also use HTML to create custom message boxes/dialogs, or directly modify the DOM like you suggest. So I am not opposed to using an external "library" for such purposes, because we could easily customize the whole thing - in fact, we could even present a "wizard"-like interface at some point. A few weeks ago I played with an AJAX output method to directly modify a wiki text box by inserting the modified cquote. --[[User:Hooray|Hooray]] ([[User talk:Hooray|talk]]) 15:11, 22 June 2014 (UTC)
::: I added a jQuery dialog output method. Right now it is not very usable. There should be the autoselection of the content, I went for a textarea but it could be anything. Importing the jQuery UI css works, but then it has relative urls to the images... Another not-really-an-issue is that selecting the text in the textarea triggers the script again (failing). However ctrl-a ctrl-c does the job of selecting and copying, I guess it gets automatically the focus. It also breaks the normal selection (you can cancel, but the selection is gone).
::: It needs to be enabled by setting OUTPUT = OutputMethods().jqueryDiag;
::: --[[User:Bigstones|Bigstones]] ([[User talk:Bigstones|talk]]) 14:34, 29 June 2014 (UTC)


== Beyond just cquotes (newsletter/changelog) ==
== Beyond just cquotes (newsletter/changelog) ==

Navigation menu