Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
aa772bba
Commit
aa772bba
authored
May 21, 2014
by
Jonathon Duerig
Browse files
Load jquery before require for Jacks compatibility. Fix build issues.
parent
5fa0f84d
Changes
23
Hide whitespace changes
Inline
Side-by-side
www/aptui/error.php
View file @
aa772bba
...
...
@@ -32,6 +32,8 @@ RequiredPageArguments();
SPITHEADER
();
echo
"The URL you gave: <b>"
.
htmlentities
(
$_SERVER
[
"REQUEST_URI"
]
)
.
"</b>
is not available or is broken."
;
echo
"<script src='js/lib/jquery-2.0.3.min.js'></script>
\n
"
;
echo
"<script src='bootstrap/js/bootstrap.js'></script>
\n
"
;
echo
"<script src='js/lib/require.js' data-main='js/main'></script>"
;
SPITFOOTER
();
www/aptui/jquery-ui
/css/smoothness/jquery-ui
-1.10.4.custom.min.css
→
www/aptui/jquery-ui-1.10.4.custom.min.css
View file @
aa772bba
File moved
www/aptui/jquery.appendGrid
/css/jquery.appendGrid
-1.3.1.min.css
→
www/aptui/jquery.appendGrid-1.3.1.min.css
View file @
aa772bba
File moved
www/aptui/js/common.js
View file @
aa772bba
...
...
@@ -5,10 +5,8 @@ window.APT_OPTIONS.config = function ()
require
.
config
({
baseUrl
:
'
.
'
,
paths
:
{
'
jquery
'
:
'
js/lib/jquery-2.0.3.min
'
,
'
jquery-ui
'
:
'
jquery-ui/js/jquery-ui-1.10.4.custom
'
,
'
jquery-grid
'
:
'
jquery.appendGrid/js/jquery.appendGrid-1.3.1.min
'
,
'
bootstrap
'
:
'
bootstrap/js/bootstrap
'
,
'
jquery-ui
'
:
'
js/lib/jquery-ui-1.10.4.custom
'
,
'
jquery-grid
'
:
'
js/lib/jquery.appendGrid-1.3.1.min
'
,
'
formhelpers
'
:
'
formhelpers/js/bootstrap-formhelpers
'
,
'
dateformat
'
:
'
js/lib/date.format
'
,
'
d3
'
:
'
js/lib/d3.v3
'
,
...
...
@@ -21,49 +19,12 @@ window.APT_OPTIONS.config = function ()
'
jacks
'
:
'
https://www.emulab.net/protogeni/jacks-stable/js/jacks
'
},
shim
:
{
'
bootstrap
'
:
{
deps
:
[
'
jquery
'
]
},
'
jquery-ui
'
:
{
deps
:
[
'
jquery
'
]
},
'
jquery-grid
'
:
{
deps
:
[
'
jquery-ui
'
]
},
'
formhelpers
'
:
{
deps
:
[
'
bootstrap
'
]},
'
dateformat
'
:
{
exports
:
'
dateFormat
'
},
'
d3
'
:
{
exports
:
'
d3
'
},
'
filestyle
'
:
{
deps
:
[
'
bootstrap
'
]},
'
tablesorter
'
:
{
deps
:
[
'
jquery
'
]
},
'
tablesorterwidgets
'
:
{
deps
:
[
'
tablesorter
'
]
},
'
marked
'
:
{
exports
:
'
marked
'
},
'
underscore
'
:
{
exports
:
'
_
'
}
},
});
};
window
.
APT_OPTIONS
.
configNoQuery
=
function
()
{
require
.
config
({
baseUrl
:
'
.
'
,
paths
:
{
'
jquery
'
:
'
js/lib/jquery-2.0.3.min
'
,
'
jquery-ui
'
:
'
jquery-ui/js/jquery-ui-1.10.4.custom
'
,
'
jquery-grid
'
:
'
jquery.appendGrid/js/jquery.appendGrid-1.3.1.min
'
,
'
bootstrap
'
:
'
bootstrap/js/bootstrap
'
,
'
formhelpers
'
:
'
formhelpers/js/bootstrap-formhelpers
'
,
'
dateformat
'
:
'
js/lib/date.format
'
,
'
d3
'
:
'
js/lib/d3.v3
'
,
'
filestyle
'
:
'
js/lib/filestyle
'
,
'
tablesorter
'
:
'
js/lib/jquery.tablesorter.min
'
,
'
tablesorterwidgets
'
:
'
js/lib/jquery.tablesorter.widgets.min
'
,
'
marked
'
:
'
js/lib/marked
'
,
'
moment
'
:
'
js/lib/moment
'
,
'
underscore
'
:
'
js/lib/underscore-min
'
,
'
jacks
'
:
'
https://www.emulab.net/protogeni/jacks-stable/js/jacks
'
},
shim
:
{
'
bootstrap
'
:
{
},
'
jquery-ui
'
:
{
},
'
jquery-grid
'
:
{
deps
:
[
'
jquery-ui
'
]
},
'
formhelpers
'
:
{
/*deps: ['bootstrap']*/
},
'
formhelpers
'
:
{
},
'
dateformat
'
:
{
exports
:
'
dateFormat
'
},
'
d3
'
:
{
exports
:
'
d3
'
},
'
filestyle
'
:
{
deps
:
[
'
bootstrap
'
]
},
'
filestyle
'
:
{
},
'
tablesorter
'
:
{
},
'
tablesorterwidgets
'
:
{
deps
:
[
'
tablesorter
'
]
},
'
marked
'
:
{
exports
:
'
marked
'
},
...
...
www/aptui/js/instantiate.js
View file @
aa772bba
window
.
APT_OPTIONS
.
config
NoQuery
();
window
.
APT_OPTIONS
.
config
();
require
([
// jQuery modules
require
([
'
js/quickvm_sup
'
,
// jQuery modules
'
formhelpers
'
,
'
filestyle
'
,
'
marked
'
,
'
jacks
'
],
function
()
function
(
sup
)
{
'
use strict
'
;
...
...
@@ -48,6 +48,7 @@ function ()
});
UpdateProfileSelection
(
$
(
'
#profile_name li[value =
'
+
window
.
PROFILE
+
'
]
'
));
_
.
delay
(
function
()
{
$
(
'
.dropdown-toggle
'
).
dropdown
();},
500
);
}
function
resetForm
(
$form
)
{
...
...
@@ -139,31 +140,9 @@ function ()
[{
rspec
:
json
.
value
.
rspec
}]);
}
}
var
$xmlthing
=
CallMethod
(
"
getprofile
"
,
null
,
0
,
profile
);
var
$xmlthing
=
sup
.
CallMethod
(
"
getprofile
"
,
null
,
0
,
profile
);
$xmlthing
.
done
(
callback
);
}
function
CallMethod
(
method
,
callback
,
uuid
,
arg
)
{
return
$
.
ajax
({
// the URL for the request
url
:
window
.
location
.
href
,
// the data to send (will be converted to a query string)
data
:
{
uuid
:
uuid
,
ajax_request
:
1
,
ajax_method
:
method
,
ajax_argument
:
arg
,
},
// whether this is a POST or GET request
type
:
(
arg
?
"
GET
"
:
"
GET
"
),
// the type of data we expect back
dataType
:
"
json
"
,
});
}
$
(
document
).
ready
(
initialize
);
});
www/aptui/j
query-ui/js
/jquery-ui-1.10.4.custom.js
→
www/aptui/j
s/lib
/jquery-ui-1.10.4.custom.js
View file @
aa772bba
File moved
www/aptui/j
query.appendGrid/js
/jquery.appendGrid-1.3.1.min.js
→
www/aptui/j
s/lib
/jquery.appendGrid-1.3.1.min.js
View file @
aa772bba
File moved
www/aptui/js/main.js
View file @
aa772bba
window
.
APT_OPTIONS
.
config
();
require
([
'
jquery
'
,
'
js/quickvm_sup
'
,
require
([
'
js/quickvm_sup
'
// jQuery modules
'
bootstrap
'
],
function
(
$
,
sup
)
],
function
(
sup
)
{
'
use strict
'
;
...
...
www/aptui/js/manage_profile.js
View file @
aa772bba
window
.
APT_OPTIONS
.
config
();
require
([
'
jquery
'
,
'
underscore
'
,
'
js/quickvm_sup
'
,
require
([
'
underscore
'
,
'
js/quickvm_sup
'
,
'
js/lib/text!template/manage-profile.html
'
,
'
js/lib/text!template/waitwait-modal.html
'
,
'
js/lib/text!template/imaging-modal.html
'
,
...
...
@@ -8,8 +8,8 @@ require(['jquery', 'underscore', 'js/quickvm_sup',
'
js/lib/text!template/showtopo-modal.html
'
,
'
js/lib/text!template/rspectextview-modal.html
'
,
// jQuery modules
'
bootstrap
'
,
'
filestyle
'
,
'
marked
'
,
'
jquery-ui
'
,
'
jquery-grid
'
],
function
(
$
,
_
,
sup
,
'
filestyle
'
,
'
marked
'
,
'
jquery-ui
'
,
'
jquery-grid
'
],
function
(
_
,
sup
,
manageString
,
waitwaitString
,
imagingString
,
rendererString
,
showtopoString
,
rspectextviewString
)
{
...
...
www/aptui/js/myexperiments.js
View file @
aa772bba
window
.
APT_OPTIONS
.
config
();
require
([
'
jquery
'
,
'
js/quickvm_sup
'
,
'
tablesorter
'
,
'
tablesorterwidgets
'
,
'
bootstrap
'
],
function
(
$
,
sup
)
require
([
'
js/quickvm_sup
'
,
'
tablesorter
'
,
'
tablesorterwidgets
'
],
function
(
sup
)
{
'
use strict
'
;
...
...
www/aptui/js/myprofiles.js
View file @
aa772bba
window
.
APT_OPTIONS
.
config
();
require
([
'
jquery
'
,
'
js/quickvm_sup
'
,
'
tablesorter
'
,
'
tablesorterwidgets
'
,
'
bootstrap
'
],
function
(
$
,
sup
)
require
([
'
js/quickvm_sup
'
,
'
tablesorter
'
,
'
tablesorterwidgets
'
],
function
(
sup
)
{
'
use strict
'
;
var
ajaxurl
=
null
;
...
...
www/aptui/js/null.js
View file @
aa772bba
window
.
APT_OPTIONS
.
config
();
require
([
'
jquery
'
,
'
js/quickvm_sup
'
,
// jQuery modules
'
bootstrap
'
],
function
(
$
,
sup
)
require
([
'
js/quickvm_sup
'
],
function
(
sup
)
{
'
use strict
'
;
...
...
www/aptui/js/quickvm_sup.js
View file @
aa772bba
define
([
'
jquery
'
,
'
d3
'
,
'
dateformat
'
,
'
marked
'
],
function
(
$
,
d3
)
{
define
([
'
d3
'
,
'
dateformat
'
,
'
marked
'
],
function
(
d3
)
{
function
ShowModal
(
which
)
{
...
...
www/aptui/js/signup.js
View file @
aa772bba
window
.
APT_OPTIONS
.
config
();
require
([
'
jquery
'
,
'
underscore
'
,
'
js/quickvm_sup
'
,
require
([
'
underscore
'
,
'
js/quickvm_sup
'
,
'
js/lib/text!template/about-account.html
'
,
'
js/lib/text!template/verify-modal.html
'
,
'
js/lib/text!template/signup-personal.html
'
,
'
js/lib/text!template/signup-project.html
'
,
'
js/lib/text!template/signup.html
'
,
// jQuery modules
'
bootstrap
'
,
'
formhelpers
'
],
function
(
$
,
_
,
sup
,
'
formhelpers
'
],
function
(
_
,
sup
,
aboutString
,
verifyString
,
personalString
,
projectString
,
signupString
)
{
...
...
www/aptui/js/status.js
View file @
aa772bba
window
.
APT_OPTIONS
.
config
();
require
([
'
jquery
'
,
'
js/quickvm_sup
'
,
'
moment
'
,
'
tablesorter
'
,
'
tablesorterwidgets
'
,
'
bootstrap
'
],
function
(
$
,
sup
,
moment
)
require
([
'
js/quickvm_sup
'
,
'
moment
'
,
'
tablesorter
'
,
'
tablesorterwidgets
'
],
function
(
sup
,
moment
)
{
'
use strict
'
;
var
CurrentTopo
=
null
;
...
...
www/aptui/login.php
View file @
aa772bba
...
...
@@ -64,6 +64,8 @@ if (NOLOGINS()) {
SPITHEADER
();
SPITUSERERROR
(
"Sorry, logins are temporarily disabled, "
.
"please try again later."
);
echo
"<script src='js/lib/jquery-2.0.3.min.js'></script>
\n
"
;
echo
"<script src='bootstrap/js/bootstrap.js'></script>
\n
"
;
echo
"<script src='js/lib/require.js' data-main='js/main'></script>"
;
SPITFOOTER
();
return
;
...
...
@@ -145,6 +147,8 @@ function SPITFORM($uid, $referrer, $error)
</div>
</div>
\n
"
;
echo
"<script src='js/lib/jquery-2.0.3.min.js'></script>
\n
"
;
echo
"<script src='bootstrap/js/bootstrap.js'></script>
\n
"
;
echo
"<script src='js/lib/require.js' data-main='js/main'></script>"
;
SPITFOOTER
();
return
;
...
...
@@ -182,6 +186,8 @@ else {
restored. <br> <br>
Please do not attempt to login again; it will not work!
</h3>
\n
"
;
echo
"<script src='js/lib/jquery-2.0.3.min.js'></script>
\n
"
;
echo
"<script src='bootstrap/js/bootstrap.js'></script>
\n
"
;
echo
"<script src='js/lib/require.js' data-main='js/main'></script>"
;
SPITFOOTER
();
return
;
...
...
www/aptui/logout.php
View file @
aa772bba
...
...
@@ -44,6 +44,8 @@ if ($this_user) {
else
{
SPITHEADER
();
echo
"<center><font color=red>Logout failed!</font></failed>
\n
"
;
echo
"<script src='js/lib/jquery-2.0.3.min.js'></script>
\n
"
;
echo
"<script src='bootstrap/js/bootstrap.js'></script>
\n
"
;
echo
"<script src='js/lib/require.js' data-main='js/main'></script>"
;
SPITFOOTER
();
}
...
...
www/aptui/manage_profile.php
View file @
aa772bba
...
...
@@ -110,9 +110,9 @@ function SPITFORM($formfields, $errors)
echo
"</script>
\n
"
;
echo
"<link rel='stylesheet'
href='jquery-ui
/css/smoothness/jquery-ui
-1.10.4.custom.min.css'>
\n
"
;
href='jquery-ui-1.10.4.custom.min.css'>
\n
"
;
echo
"<link rel='stylesheet'
href='jquery.appendGrid
/css/jquery.appendGrid
-1.3.1.min.css'>
\n
"
;
href='jquery.appendGrid-1.3.1.min.css'>
\n
"
;
# For progress bubbles in the imaging modal.
echo
"<link rel='stylesheet' href='progress.css'>
\n
"
;
...
...
@@ -129,6 +129,8 @@ function SPITFORM($formfields, $errors)
echo
" window.SNAPUUID = '
$snapuuid
';
\n
"
;
}
echo
"</script>
\n
"
;
echo
"<script src='js/lib/jquery-2.0.3.min.js'></script>
\n
"
;
echo
"<script src='bootstrap/js/bootstrap.js'></script>
\n
"
;
echo
"<script src='js/lib/require.js' data-main='js/manage_profile'>
</script>"
;
...
...
www/aptui/myexperiments.php
View file @
aa772bba
...
...
@@ -137,6 +137,8 @@ if (ISADMIN() && !isset($all)) {
echo
" </div>
</div>
\n
"
;
echo
"<script src='js/lib/jquery-2.0.3.min.js'></script>
\n
"
;
echo
"<script src='bootstrap/js/bootstrap.js'></script>
\n
"
;
echo
"<script src='js/lib/require.js' data-main='js/myexperiments'></script>
\n
"
;
SPITFOOTER
();
...
...
www/aptui/myprofiles.php
View file @
aa772bba
...
...
@@ -183,6 +183,8 @@ echo "<!-- This is the topology view modal -->
echo
"<script type='text/javascript'>
\n
"
;
echo
" window.AJAXURL = 'server-ajax.php';
\n
"
;
echo
"</script>
\n
"
;
echo
"<script src='js/lib/jquery-2.0.3.min.js'></script>
\n
"
;
echo
"<script src='bootstrap/js/bootstrap.js'></script>
\n
"
;
echo
"<script src='js/lib/require.js' data-main='js/myprofiles'></script>
\n
"
;
SPITFOOTER
();
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment