You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2011/12/09 13:25:22 UTC
svn commit: r1212366 [1/5] - in
/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp:
./ WEB-INF/ js/ js/archiva/ js/redback/
Author: olamy
Date: Fri Dec 9 12:25:21 2011
New Revision: 1212366
URL: http://svn.apache.org/viewvc?rev=1212366&view=rev
Log:
add missing js files
Added:
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-alerts.js (with props)
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-dropdown.js (with props)
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-modal.js (with props)
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/jquery-ui-1.8.16.custom.min.js (with props)
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/jquery.cookie.1.0.0.js (with props)
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/jquery.i18n.properties-1.0.9.js (with props)
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/jquery.json-2.3.min.js (with props)
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/jquery.tmpl.js (with props)
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/jquery.validate.js (with props)
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/knockout-debug.js (with props)
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/knockout.simpleGrid.js (with props)
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/order.js (with props)
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/text.js (with props)
Removed:
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/WEB-INF/index.html
Modified:
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/i18nload.js
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/register.js
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js
Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html?rev=1212366&r1=1212365&r2=1212366&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html Fri Dec 9 12:25:21 2011
@@ -41,7 +41,7 @@
});
$LAB.setGlobalDefaults({AlwaysPreserveOrder:true,BasePath:"js/",explicit_preloading:false});
$LAB
- .script("utils.js").wait()
+ .script("archiva/utils.js").wait()
.script("jquery.tmpl.js").wait()
.script("jquery.cookie.1.0.0.js").wait()
.script("knockout-debug.js").wait()
@@ -52,7 +52,7 @@
.script("jquery.validate.js").wait()
.script("jquery.json-2.3.min.js").wait()
.script("redback/operation.js").wait()
- .script("main-tmpl.js").wait()
+ .script("archiva/main-tmpl.js").wait()
.script("redback/redback-tmpl.js").wait()
.script("bootstrap-modal.js").wait()
.script("bootstrap-alerts.js").wait()
@@ -60,7 +60,7 @@
.script("knockout.simpleGrid.js").wait()
.script("redback/user.js").wait()
.script("redback/users.js").wait()
- .script("main.js");
+ .script("archiva/main.js");
</script>
Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js?rev=1212366&r1=1212365&r2=1212366&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main-tmpl.js Fri Dec 9 12:25:21 2011
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-require(["text!templates/menu.html","text!templates/topbar.html","text!templates/message.html"],
+require(["text!archiva/templates/menu.html","text!archiva/templates/topbar.html","text!archiva/templates/message.html"],
function(menu,topbar,message) {
// template loading
Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js?rev=1212366&r1=1212365&r2=1212366&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/main.js Fri Dec 9 12:25:21 2011
@@ -35,10 +35,10 @@ function($) {
* return a user see user.js if user logged otherwise null
*/
userLogged=function() {
- // call /restServices/redbackServices/loginService/isLogged to know
+ // call restServices/redbackServices/loginService/isLogged to know
// if a session exists and check the cookie
var userLogged = true;
- $.ajax("/restServices/redbackServices/loginService/isLogged", {
+ $.ajax("restServices/redbackServices/loginService/isLogged", {
type: "GET",
async: false,
success: function(data) {
@@ -78,7 +78,7 @@ function($) {
screenChange();
$("#main-content").html("");
$.ajax({
- url: '/restServices/redbackServices/loginService/logout'
+ url: 'restServices/redbackServices/loginService/logout'
});
}
@@ -88,7 +88,7 @@ function($) {
if ($.isFunction(username)){
username = user.username();
}
- var url = '/restServices/redbackServices/userService/getCurrentUserOperations';
+ var url = 'restServices/redbackServices/userService/getCurrentUserOperations';
$.ajax({
url: url,
success: function(data){
@@ -131,7 +131,7 @@ function($) {
$('#sidebar-content').html($("#main-menu"));
- $.ajax("/restServices/redbackServices/userService/isAdminUserExists", {
+ $.ajax("restServices/redbackServices/userService/isAdminUserExists", {
type: "GET",
dataType: 'json',
success: function(data) {
Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-alerts.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-alerts.js?rev=1212366&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-alerts.js (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-alerts.js Fri Dec 9 12:25:21 2011
@@ -0,0 +1,113 @@
+/* ==========================================================
+ * bootstrap-alerts.js v1.4.0
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
+ * ==========================================================
+ * Copyright 2011 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function( $ ){
+
+ "use strict"
+
+ /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
+ * ======================================================= */
+
+ var transitionEnd
+
+ $(document).ready(function () {
+
+ $.support.transition = (function () {
+ var thisBody = document.body || document.documentElement
+ , thisStyle = thisBody.style
+ , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
+ return support
+ })()
+
+ // set CSS transition event type
+ if ( $.support.transition ) {
+ transitionEnd = "TransitionEnd"
+ if ( $.browser.webkit ) {
+ transitionEnd = "webkitTransitionEnd"
+ } else if ( $.browser.mozilla ) {
+ transitionEnd = "transitionend"
+ } else if ( $.browser.opera ) {
+ transitionEnd = "oTransitionEnd"
+ }
+ }
+
+ })
+
+ /* ALERT CLASS DEFINITION
+ * ====================== */
+
+ var Alert = function ( content, options ) {
+ this.settings = $.extend({}, $.fn.alert.defaults, options)
+ this.$element = $(content)
+ .delegate(this.settings.selector, 'click', this.close)
+ }
+
+ Alert.prototype = {
+
+ close: function (e) {
+ var $element = $(this).parent('.alert-message')
+
+ e && e.preventDefault()
+ $element.removeClass('in')
+
+ function removeElement () {
+ $element.remove()
+ }
+
+ $.support.transition && $element.hasClass('fade') ?
+ $element.bind(transitionEnd, removeElement) :
+ removeElement()
+ }
+
+ }
+
+
+ /* ALERT PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.alert = function ( options ) {
+
+ if ( options === true ) {
+ return this.data('alert')
+ }
+
+ return this.each(function () {
+ var $this = $(this)
+
+ if ( typeof options == 'string' ) {
+ return $this.data('alert')[options]()
+ }
+
+ $(this).data('alert', new Alert( this, options ))
+
+ })
+ }
+
+ $.fn.alert.defaults = {
+ selector: '.close'
+ }
+
+ $(document).ready(function () {
+ new Alert($('body'), {
+ selector: '.alert-message[data-alert] .close'
+ })
+ })
+
+}( window.jQuery || window.ender );
\ No newline at end of file
Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-alerts.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-alerts.js
------------------------------------------------------------------------------
svn:executable = *
Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-alerts.js
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-dropdown.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-dropdown.js?rev=1212366&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-dropdown.js (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-dropdown.js Fri Dec 9 12:25:21 2011
@@ -0,0 +1,55 @@
+/* ============================================================
+ * bootstrap-dropdown.js v1.4.0
+ * http://twitter.github.com/bootstrap/javascript.html#dropdown
+ * ============================================================
+ * Copyright 2011 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function( $ ){
+
+ "use strict"
+
+ /* DROPDOWN PLUGIN DEFINITION
+ * ========================== */
+
+ $.fn.dropdown = function ( selector ) {
+ return this.each(function () {
+ $(this).delegate(selector || d, 'click', function (e) {
+ var li = $(this).parent('li')
+ , isActive = li.hasClass('open')
+
+ clearMenus()
+ !isActive && li.toggleClass('open')
+ return false
+ })
+ })
+ }
+
+ /* APPLY TO STANDARD DROPDOWN ELEMENTS
+ * =================================== */
+
+ var d = 'a.menu, .dropdown-toggle'
+
+ function clearMenus() {
+ $(d).parent('li').removeClass('open')
+ }
+
+ $(function () {
+ $('html').bind("click", clearMenus)
+ $('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' )
+ })
+
+}( window.jQuery || window.ender );
Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-dropdown.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-dropdown.js
------------------------------------------------------------------------------
svn:executable = *
Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-dropdown.js
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-modal.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-modal.js?rev=1212366&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-modal.js (added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-modal.js Fri Dec 9 12:25:21 2011
@@ -0,0 +1,260 @@
+/* =========================================================
+ * bootstrap-modal.js v1.4.0
+ * http://twitter.github.com/bootstrap/javascript.html#modal
+ * =========================================================
+ * Copyright 2011 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================= */
+
+
+!function( $ ){
+
+ "use strict"
+
+ /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
+ * ======================================================= */
+
+ var transitionEnd
+
+ $(document).ready(function () {
+
+ $.support.transition = (function () {
+ var thisBody = document.body || document.documentElement
+ , thisStyle = thisBody.style
+ , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
+ return support
+ })()
+
+ // set CSS transition event type
+ if ( $.support.transition ) {
+ transitionEnd = "TransitionEnd"
+ if ( $.browser.webkit ) {
+ transitionEnd = "webkitTransitionEnd"
+ } else if ( $.browser.mozilla ) {
+ transitionEnd = "transitionend"
+ } else if ( $.browser.opera ) {
+ transitionEnd = "oTransitionEnd"
+ }
+ }
+
+ })
+
+
+ /* MODAL PUBLIC CLASS DEFINITION
+ * ============================= */
+
+ var Modal = function ( content, options ) {
+ this.settings = $.extend({}, $.fn.modal.defaults, options)
+ this.$element = $(content)
+ .delegate('.close', 'click.modal', $.proxy(this.hide, this))
+
+ if ( this.settings.show ) {
+ this.show()
+ }
+
+ return this
+ }
+
+ Modal.prototype = {
+
+ toggle: function () {
+ return this[!this.isShown ? 'show' : 'hide']()
+ }
+
+ , show: function () {
+ var that = this
+ this.isShown = true
+ this.$element.trigger('show')
+
+ escape.call(this)
+ backdrop.call(this, function () {
+ var transition = $.support.transition && that.$element.hasClass('fade')
+
+ that.$element
+ .appendTo(document.body)
+ .show()
+
+ if (transition) {
+ that.$element[0].offsetWidth // force reflow
+ }
+
+ that.$element.addClass('in')
+
+ transition ?
+ that.$element.one(transitionEnd, function () { that.$element.trigger('shown') }) :
+ that.$element.trigger('shown')
+
+ })
+
+ return this
+ }
+
+ , hide: function (e) {
+ e && e.preventDefault()
+
+ if ( !this.isShown ) {
+ return this
+ }
+
+ var that = this
+ this.isShown = false
+
+ escape.call(this)
+
+ this.$element
+ .trigger('hide')
+ .removeClass('in')
+
+ $.support.transition && this.$element.hasClass('fade') ?
+ hideWithTransition.call(this) :
+ hideModal.call(this)
+
+ return this
+ }
+
+ }
+
+
+ /* MODAL PRIVATE METHODS
+ * ===================== */
+
+ function hideWithTransition() {
+ // firefox drops transitionEnd events :{o
+ var that = this
+ , timeout = setTimeout(function () {
+ that.$element.unbind(transitionEnd)
+ hideModal.call(that)
+ }, 500)
+
+ this.$element.one(transitionEnd, function () {
+ clearTimeout(timeout)
+ hideModal.call(that)
+ })
+ }
+
+ function hideModal (that) {
+ this.$element
+ .hide()
+ .trigger('hidden')
+
+ backdrop.call(this)
+ }
+
+ function backdrop ( callback ) {
+ var that = this
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
+ if ( this.isShown && this.settings.backdrop ) {
+ var doAnimate = $.support.transition && animate
+
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
+ .appendTo(document.body)
+
+ if ( this.settings.backdrop != 'static' ) {
+ this.$backdrop.click($.proxy(this.hide, this))
+ }
+
+ if ( doAnimate ) {
+ this.$backdrop[0].offsetWidth // force reflow
+ }
+
+ this.$backdrop.addClass('in')
+
+ doAnimate ?
+ this.$backdrop.one(transitionEnd, callback) :
+ callback()
+
+ } else if ( !this.isShown && this.$backdrop ) {
+ this.$backdrop.removeClass('in')
+
+ $.support.transition && this.$element.hasClass('fade')?
+ this.$backdrop.one(transitionEnd, $.proxy(removeBackdrop, this)) :
+ removeBackdrop.call(this)
+
+ } else if ( callback ) {
+ callback()
+ }
+ }
+
+ function removeBackdrop() {
+ this.$backdrop.remove()
+ this.$backdrop = null
+ }
+
+ function escape() {
+ var that = this
+ if ( this.isShown && this.settings.keyboard ) {
+ $(document).bind('keyup.modal', function ( e ) {
+ if ( e.which == 27 ) {
+ that.hide()
+ }
+ })
+ } else if ( !this.isShown ) {
+ $(document).unbind('keyup.modal')
+ }
+ }
+
+
+ /* MODAL PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.modal = function ( options ) {
+ var modal = this.data('modal')
+
+ if (!modal) {
+
+ if (typeof options == 'string') {
+ options = {
+ show: /show|toggle/.test(options)
+ }
+ }
+
+ return this.each(function () {
+ $(this).data('modal', new Modal(this, options))
+ })
+ }
+
+ if ( options === true ) {
+ return modal
+ }
+
+ if ( typeof options == 'string' ) {
+ modal[options]()
+ } else if ( modal ) {
+ modal.toggle()
+ }
+
+ return this
+ }
+
+ $.fn.modal.Modal = Modal
+
+ $.fn.modal.defaults = {
+ backdrop: false
+ , keyboard: false
+ , show: false
+ }
+
+
+ /* MODAL DATA- IMPLEMENTATION
+ * ========================== */
+
+ $(document).ready(function () {
+ $('body').delegate('[data-controls-modal]', 'click', function (e) {
+ e.preventDefault()
+ var $this = $(this).data('show', true)
+ $('#' + $this.attr('data-controls-modal')).modal( $this.data() )
+ })
+ })
+
+}( window.jQuery || window.ender );
Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-modal.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-modal.js
------------------------------------------------------------------------------
svn:executable = *
Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/bootstrap-modal.js
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision