Commit Graph
330 Commits
Author SHA1 Message Date
Kohsuke Kawaguchi a2a398ed0c merge the tooltip to the context menu 2012-12-06 08:54:29 -08:00
Kohsuke Kawaguchi d7b59bfc7d Fixed a regression introduced by pull request #606 2012-11-13 12:26:38 -08:00
Nicolas De loof 4e8dcbe6d7 Merge pull request #606 from ndeloof/maven-settings2
inverse maven-plugin -> config-file-provider dependency
2012-11-08 23:52:54 -08:00
imod edd6841644 minor changes from pull feedback 2012-11-05 18:34:02 +01:00
imod 2c977c79ea add help 2012-11-04 11:26:30 +01:00
Cliffano Subagio feba7ddd9e Add note on multiple patterns.
As recommended on this old mailing list thread http://jenkins.361315.n4.nabble.com/Multiple-test-reports-td380558.html . Which I found after Googling for a hint on specifying multiple Jenkins JUnit reports.
2012-11-01 18:44:34 +11:00
Kohsuke Kawaguchi 1c578ab554 [FIXED JENKINS-15617]
execScript cannot return value [1], so I'm restricting its use to where
we don't care about the return value. See ticket for more discussions

[1] http://msdn.microsoft.com/en-us/library/ie/ms536420(v=vs.85).aspx
2012-10-26 19:20:34 -07:00
Jesse Glick 52274032e3 addLoadEvent failed to pass on the Event object.
Does not matter for any handlers used in Jenkins, but can break third-party frameworks.
In particular mixpanel-2.1.min.js seems to detect when this mistake is made and somehow disables some Jenkins handlers,
causing e.g. “LOADING” to stay on job config pages and breaking behavior.js (but only on Firefox).

Using addEventListener/attachEvent where available also works, but this fix is a bit simpler and more general.
https://gist.github.com/1930440 would also work but again seems like overkill here.

To reproduce:
diff --git a/core/src/main/resources/lib/layout/layout.jelly b/core/src/main/resources/lib/layout/layout.jelly
index 1fb3fec..c1337c4 100644
--- a/core/src/main/resources/lib/layout/layout.jelly
+++ b/core/src/main/resources/lib/layout/layout.jelly
@@ -88,6 +88,19 @@ ${h.initPageVariables(context)}
 <x:doctype name="html" />
 <html>
   <head>
+<script type="text/javascript"><![CDATA[
+(function(c,a){window.mixpanel=a;var b,d,h,e;b=c.createElement("script");
+    b.type="text/javascript";b.async=!0;b.src=("https:"===c.location.protocol?"https:":"http:")+
+    '//cdn.mxpnl.com/libs/mixpanel-2.1.min.js';d=c.getElementsByTagName("script")[0];
+    d.parentNode.insertBefore(b,d);a._i=[];a.init=function(b,c,f){function d(a,b){
+    var c=b.split(".");2==c.length&&(a=a[c[0]],b=c[1]);a[b]=function(){a.push([b].concat(
+    Array.prototype.slice.call(arguments,0)))}}var g=a;"undefined"!==typeof f?g=a[f]=[]:
+    f="mixpanel";g.people=g.people||[];h=['disable','track','track_pageview','track_links',
+    'track_forms','register','register_once','unregister','identify','name_tag',
+    'set_config','people.identify','people.set','people.increment'];for(e=0;e<h.length;e++)d(g,h[e]);
+    a._i.push([b,c,f])};a.__SV=1.1;})(document,window.mixpanel||[]);
+    mixpanel.init("…something valid here…");
+]]></script>
     ${h.checkPermission(it,permission)}

     <title>${h.appendIfNotNull(title, ' [Jenkins]', 'Jenkins')}</title>
2012-10-26 20:03:03 -04:00
Kohsuke Kawaguchi 5aca73f183 [JENKINS-15617]
This needs to be eval, not geval.
Plus I forgot to return the value.
2012-10-24 18:49:00 -07:00
Kohsuke Kawaguchi 51f508ba37 [FIXED JENKINS-15617]
Evaluate script in global context.
See http://perfectionkills.com/global-eval-what-are-the-options/ for how
to evaluate JavaScript in global context.
2012-10-24 17:41:20 -07:00
Kohsuke Kawaguchi 18561d5f24 Revert "1.486 special for a week."
This reverts commit c8e5cb93ec.
2012-10-25 03:02:23 +09:00
Jesse Glick d9ba4814f9 Removing stale references to dev.java.net. 2012-10-18 10:29:14 -04:00
Kohsuke Kawaguchi 6ea1b8c7ee merged back the RC branch 2012-10-14 18:26:14 -07:00
Kohsuke Kawaguchi c8e5cb93ec 1.486 special for a week. 2012-10-12 18:31:14 -07:00
Jesse Glick 8dbee911c3 [FIXED JENKINS-15494] Uncaught TypeError: Cannot read property 'firstChild' of null 2012-10-12 15:58:06 -04:00
Jesse Glick 06514d2517 [JENKINS-15206] Fixed up some remaining references to /people and introduced a redirect page.
Thanks to newenigma for catching.
2012-10-04 11:10:29 -04:00
Kohsuke Kawaguchi 7b9066267c making error detection easier 2012-09-28 13:55:51 -07:00
Jesse Glick 5c5bfeb099 @since 2012-09-18 20:10:25 -04:00
Jesse Glick f610c71549 ts_refresh was much harder than I thought. 2012-09-18 19:57:46 -04:00
Jesse Glick c6f17d097e ts_refresh 2012-09-18 19:06:23 -04:00
Kohsuke Kawaguchi bc9ae609f6 need to send in the query parameters as well 2012-09-13 11:23:51 -07:00
Kohsuke Kawaguchi f3701da9e2 [JENKINS-15105]
Prefer the postMessage version to retrieve the metadata so that we can leave the existing JSON format as-is for backward compatibility with pre-1.424 Jenkins.
2012-09-11 19:08:12 -07:00
Kohsuke Kawaguchi 8db3263e2b submit ID to the server so that smart servers can know what IDs to put into JSON 2012-09-07 14:17:19 -07:00
Kohsuke Kawaguchi 285a508b25 improve the error handling 2012-09-07 14:12:26 -07:00
Jesse Glick 20a5daa347 Unclear whether 'function() {...}();' is syntactically valid (works in Chrome & HtmlUnit tests) or whether we need '(function() {...})();' as Rhino seems to demand and various other scripts use. 2012-08-22 19:49:31 -04:00
Jesse Glick 951f048bc1 Continuing c9cf3b6, retain jenkinsRule but empty as a placeholder, and register its rules in the new way.
Registering them with increasing positions, since there seems to be some implicit order dependency involving TR.rowvg-start.
2012-08-22 18:51:32 -04:00
Jesse Glick 0f36c5321a Make 'storage' truly private, so we never again have people trying to directly edit this struct. 2012-08-22 15:53:46 -04:00
Jesse Glick d75daef964 TAB -> spaces 2012-08-21 22:16:59 -04:00
Jesse Glick c9cf3b67bb Retain hudsonRules/jenkinsRules for now, as many scripts in core & plugins directly modify this hash. 2012-08-21 22:13:59 -04:00
Jesse Glick e3266eb8d5 Run deprecated behaviors at position 0. 2012-08-21 22:13:20 -04:00
Jesse Glick fbb77a8ef8 Changed meaning of priority in Behaviour.specify.
Callers seem to expect that priority behaviors are applied before any behaviors in other selectors.
2012-08-21 20:59:41 -04:00
Jesse Glick 81bdb4be8e Updated to Behaviour.specify. 2012-08-21 20:39:04 -04:00
Jesse Glick 19e2a0127f Addition of Behaviour.specify, and basic test updates. 2012-08-21 20:06:34 -04:00
Jesse Glick f39fbdb312 [JENKINS-14495] Refined fix - needed to pull uniqueness check out of apply() fn in case we were being passed an Array of nodes.
Fixes test failures introduced by  dbb100d, and adds a test for it now that I know it can be done.
2012-08-03 15:46:32 -04:00
Jesse Glick dbb100da58 [FIXED JENKINS-14495] Hetero lists not working correctly after adding elements.
Unlike [JENKINS-14514] this is a true fix rather than a workaround (now removed), and is more general.
cjo9900 discovered that behaviors were being redundantly registered (as of 1.474 the monolithic JS is broken up);
this caused some behaviors to be run repeatedly on the same elements, breaking reasonable expectations of some behaviors.
The ideal fix would be to change Behavior.register to be idempotent: for example, key it by selector, then maintain a set of distinct behavior functions for each.
Unfortunately some adjuncts directly call Behavior.list.unshift, bypassing register(...), which would be tricky to intercept (would need to make a mock of Array).
The known one cases are in core, but it is possible plugin adjuncts do this too, in which case it would be incompatible to (say) change the Array<Map<String,Behavior>> to a Map<String,Array<Behavior>>.
Instead, permitting redundant registrations as before, and just silently skipping all but the first at runtime when applying behaviors.
Beware that since adjuncts are loaded from multiple places, different JS function objects are registered each time, so a naive set of behavior functions does not work;
have to identify functions by their toString in order to ensure that each is run only once.
(Currently once _per selector_, conceivably >1x per element; could if necessary be refined to make sure a given behavior is only run once on a given element during one call to applySubtree even if the element matches multiple selectors.)
2012-08-03 12:53:48 -04:00
Jesse Glick b98b57038c Link fix. 2012-07-31 11:50:03 -04:00
Kohsuke Kawaguchi 0427b1449b refactored 2012-07-31 16:30:33 +09:00
Kohsuke Kawaguchi 7db5fb34aa refactored 2012-07-31 16:30:33 +09:00
Jesse Glick 680fd480c3 Corrected a misleading comment. 2012-07-27 16:51:28 -04:00
Kohsuke Kawaguchi 83c0a6f12c these help files were in a wrong location 2012-07-23 14:44:54 -07:00
Kohsuke Kawaguchi 31bda5786a making this more discoverable 2012-07-23 14:10:16 -07:00
Kohsuke Kawaguchi 57a4c02cda Merge branch 'pull-506' 2012-06-29 20:21:28 -07:00
Kohsuke Kawaguchi 30837d8903 Better encapsulation of JavaScript.
Don't expose stuff that need not be exposed.
2012-06-29 20:19:23 -07:00
Kohsuke Kawaguchi 96442cd9cd splitting JavaScript into smaller fragments for better maintainability.
One of the problems with the current way Jenkins puts JavaScripts is that most everything is in a single file. It doesn't highlight the relationship between those fragments and their corresponding tag files.

So I'm experimenting with moving out these fragments into individual JavaScript files co-located with the tag file. They then get loaded into the page via <st:adjunct>. Each script is served with unique URL such that the browser will not even have to try conditional GET when loading different pages, so this should prevent the performance problem caused by the fact that there are now lots of <script> tags in the page.

 If for some reason even this turns out to be a problem, we can always add additional build steps to concatenate them all.
2012-06-28 15:24:53 -07:00
Kohsuke Kawaguchi 02854d87bd Wrong variable name 2012-06-22 17:45:17 -07:00
Kohsuke Kawaguchi d318bbae5b Added code to assist form-element-path plugin 2012-06-22 17:41:30 -07:00
Kohsuke Kawaguchi 74bea665c6 copy & keep CSS class names 2012-06-22 17:41:30 -07:00
Kohsuke Kawaguchi 7c5efe367b deprecating 'fooButton' class in favor of 'foo-button'
This makes it consistent with other buttons like repeatable-add-button, and use of '-' prevents name collisions with form names, and make all of those UI controls addressible in the same namespace
2012-06-22 17:41:30 -07:00
Alberto Gragera 581b8256b1 Make Jenkins stop polling resources if the page is not visible (and if the browser supports Page Visibility API), restoring pollings when the page becomes visible again. This will make tabs in the background to not consume resources 2012-06-22 12:55:02 +02:00
Kohsuke Kawaguchi bc0b850510 Merge branch 'pull-434.2' 2012-06-11 15:23:28 -07:00