Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

not related to screw.unit

  • Loading branch information...
commit f18d6d96d9775ff6a73ba2453bbd84274fe0593f 1 parent f51d3aa
Nick Kallen authored
Showing with 0 additions and 57 deletions.
  1. +0 −36 lib/screw.assets.js
  2. +0 −21 lib/screw.server.js
View
36 lib/screw.assets.js
@@ -1,36 +0,0 @@
-(function() {
- Screw.Assets = {};
- Screw.Assets.use_cache_buster = false; // TODO: NS/CTI - make this configurable from the UI.
- var required_paths = [];
- var included_stylesheets = {};
- var cache_buster = parseInt(new Date().getTime()/(1*1000));
-
- Screw.Assets.require = function(javascript_path, onload) {
- if(!required_paths[javascript_path]) {
- var full_path = javascript_path + ".js";
- if (Screw.Assets.use_cache_buster) {
- full_path += '?' + cache_buster;
- }
- document.write("<script src='" + full_path + "' type='text/javascript'></script>");
- if(onload) {
- var scripts = document.getElementsByTagName('script');
- scripts[scripts.length-1].onload = onload;
- }
- required_paths[javascript_path] = true;
- }
- };
-
- Screw.Assets.stylesheet = function(stylesheet_path) {
- if(!included_stylesheets[stylesheet_path]) {
- var full_path = stylesheet_path + ".css";
- if(Screw.Assets.use_cache_buster) {
- full_path += '?' + cache_buster;
- }
- document.write("<link rel='stylesheet' type='text/css' href='" + full_path + "' />");
- included_stylesheets[stylesheet_path] = true;
- }
- };
-
- window.require = Screw.Assets.require;
- window.stylesheet = Screw.Assets.stylesheet;
-})();
View
21 lib/screw.server.js
@@ -1,21 +0,0 @@
-(function($) {
- var ajax = $.ajax;
- $(Screw).bind('after', function() {
- var error_text = $(".error").map(function(i, element) {
- return element.innerHTML;
- }).get().join("\n");
-
- var suite_id;
- if(top.runOptions) {
- suite_id = top.runOptions.getSessionId();
- } else {
- suite_id = 'user';
- }
-
- ajax({
- type: "POST",
- url: '/suites/' + suite_id + '/finish',
- data: {"text": error_text}
- });
- });
-})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.