Skip to content

Commit

Permalink
Merge pull request #151 from karma4u101/147-update_ui_bootstrap
Browse files Browse the repository at this point in the history
Updating UI Bootstrap
  • Loading branch information
karma4u101 authored Jul 28, 2017
2 parents c86bc1a + d79d905 commit 16c7d82
Show file tree
Hide file tree
Showing 12 changed files with 404 additions and 282 deletions.

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -316,21 +316,21 @@ package object foboajsres {
}

/**
* Enable usage of AngularUI-Bootstrap version 2․4․0 resource files in your bootstrap liftweb Boot.
* @version 2.4.0
* Enable usage of AngularUI-Bootstrap version 2․5․0 resource files in your bootstrap liftweb Boot.
* @version 2.5.0
*
* '''Example:'''
*
* {{{
* import net.liftmodules.{foboajsres => fobo}
* :
* fobo.Resource.init=fobo.Resource.AJSUIBootstrap240
* fobo.Resource.init=fobo.Resource.AJSUIBootstrap250
* }}}
*
*/
case object AJSUIBootstrap240 extends Resource {
case object AJSUIBootstrap250 extends Resource {
FoBoResources.init
FoBoResources.uibootstrap240
FoBoResources.uibootstrap250
}

/**
Expand Down Expand Up @@ -14072,36 +14072,36 @@ package object foboajsres {
}
}

lazy val uibootstrap240 = {
lazy val uibootstrap250 = {
ResourceServer.rewrite {
case "fobo" :: "ui-bootstrap.js" :: Nil if Props.devMode =>
List("fobo",
"angular-ui",
"bootstrap",
"2.4.0",
"2.5.0",
"js",
"ui-bootstrap-2.4.0.js")
"ui-bootstrap-2.5.0.js")
case "fobo" :: "ui-bootstrap.js" :: Nil =>
List("fobo",
"angular-ui",
"bootstrap",
"2.4.0",
"2.5.0",
"js",
"ui-bootstrap-2.4.0.min.js")
"ui-bootstrap-2.5.0.min.js")
case "fobo" :: "ui-bootstrap-tpls.js" :: Nil if Props.devMode =>
List("fobo",
"angular-ui",
"bootstrap",
"2.4.0",
"2.5.0",
"js",
"ui-bootstrap-tpls-2.4.0.js")
"ui-bootstrap-tpls-2.5.0.js")
case "fobo" :: "ui-bootstrap-tpls.js" :: Nil =>
List("fobo",
"angular-ui",
"bootstrap",
"2.4.0",
"2.5.0",
"js",
"ui-bootstrap-tpls-2.4.0.min.js")
"ui-bootstrap-tpls-2.5.0.min.js")
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package net.liftmodules

import net.liftweb._
import util.{Props}
import http._
import common._

import org.specs2.mutable.{Specification}
//import org.specs2.mutable.BeforeAfter
Expand Down Expand Up @@ -264,31 +262,31 @@ object FoBoAJSResSpec extends Specification {
}
}

//AJSUIBootstrap240
"With foboajsres.Resource.init set to foboajsres.Resource.AJSUIBootstrap240 the ResourceServer" should {
//AJSUIBootstrap250
"With foboajsres.Resource.init set to foboajsres.Resource.AJSUIBootstrap250 the ResourceServer" should {
"allow fobo/ui-bootstrap.js" in {
allowResource(foboajsres.Resource.AJSUIBootstrap240,
allowResource(foboajsres.Resource.AJSUIBootstrap250,
"fobo" :: "ui-bootstrap.js" :: Nil) must_== true
}
"rewrit fobo/ui-bootstrap.js to fobo/angular-ui/bootstrap/2.4.0/js/ui-bootstrap-2.4.0.min.js" in {
rewriteResource(foboajsres.Resource.AJSUIBootstrap240,
"rewrit fobo/ui-bootstrap.js to fobo/angular-ui/bootstrap/2.5.0/js/ui-bootstrap-2.5.0.min.js" in {
rewriteResource(foboajsres.Resource.AJSUIBootstrap250,
"fobo" :: "ui-bootstrap.js" :: Nil) must_==
List("fobo",
"angular-ui",
"bootstrap",
"2.4.0",
"2.5.0",
"js",
"ui-bootstrap-2.4.0.min.js")
"ui-bootstrap-2.5.0.min.js")
}
"rewrit fobo/ui-bootstrap-tpls.js to fobo/angular-ui/bootstrap/2.4.0/js/ui-bootstrap-tpls-2.4.0.min.js" in {
rewriteResource(foboajsres.Resource.AJSUIBootstrap240,
"rewrit fobo/ui-bootstrap-tpls.js to fobo/angular-ui/bootstrap/2.5.0/js/ui-bootstrap-tpls-2.5.0.min.js" in {
rewriteResource(foboajsres.Resource.AJSUIBootstrap250,
"fobo" :: "ui-bootstrap-tpls.js" :: Nil) must_==
List("fobo",
"angular-ui",
"bootstrap",
"2.4.0",
"2.5.0",
"js",
"ui-bootstrap-tpls-2.4.0.min.js")
"ui-bootstrap-tpls-2.5.0.min.js")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,21 +331,21 @@ package object foboajs {
}

/**
* Enable usage of FoBo's Angular API and AngularUI-Bootstrap resources version 2․4․0 in your bootstrap liftweb Boot.
* @version 2.4.0
* Enable usage of FoBo's Angular API and AngularUI-Bootstrap resources version 2․5․0 in your bootstrap liftweb Boot.
* @version 2.5.0
*
* '''Example:'''
*
* {{{
* import net.liftmodules.{foboajs => fobo}
* :
* fobo.Toolkit.init=fobo.Toolkit.AJSUIBootstrap240
* fobo.Toolkit.init=fobo.Toolkit.AJSUIBootstrap250
* }}}
*
* @since v2.0
*/
case object AJSUIBootstrap240 extends Toolkit {
case object AJSUIBootstrap250 extends Toolkit {
foboajsapi.API.Angular1
foboajsres.Resource.AJSUIBootstrap240
foboajsres.Resource.AJSUIBootstrap250
}

/**
Expand All @@ -361,6 +361,7 @@ package object foboajs {
* }}}
*
*/
@deprecated("Use AJSUIBootstrap250 or later", "2.0.0")
case object AJSUIBootstrap0100 extends Toolkit {
foboajsapi.API.Angular1
foboajsres.Resource.AJSUIBootstrap0100
Expand Down Expand Up @@ -696,20 +697,20 @@ package object foboajs {
}

/**
* Enable usage of AngularUI-Bootstrap version 2․4․0 resource files in your bootstrap liftweb Boot.
* @version 2.4.0
* Enable usage of AngularUI-Bootstrap version 2․5․0 resource files in your bootstrap liftweb Boot.
* @version 2.5.0
*
* '''Example:'''
*
* {{{
* import net.liftmodules.{foboajs => fobo}
* :
* fobo.Resource.init=fobo.Resource.AJSUIBootstrap240
* fobo.Resource.init=fobo.Resource.AJSUIBootstrap250
* }}}
*
* @since v2.0
*/
case object AJSUIBootstrap240 extends Resource {
foboajsres.Resource.AJSUIBootstrap240
case object AJSUIBootstrap250 extends Resource {
foboajsres.Resource.AJSUIBootstrap250
}

/**
Expand All @@ -725,6 +726,7 @@ package object foboajs {
* }}}
*
*/
@deprecated("Use AJSUIBootstrap250 or later", "2.0.0")
case object AJSUIBootstrap0100 extends Resource {
foboajsres.Resource.AJSUIBootstrap0100
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,38 +375,38 @@ class FoBoAJSSpec extends mutable.Specification {
}
}

//AJSUIBootstrap240
"With foboajs.Toolkit.init set to foboajs.Toolkit.AJSUIBootstrap240 the ResourceServer" should {
//AJSUIBootstrap250
"With foboajs.Toolkit.init set to foboajs.Toolkit.AJSUIBootstrap250 the ResourceServer" should {
"allow fobo/ui-bootstrap.js" in {
allowToolkitInit(foboajs.Toolkit.AJSUIBootstrap240,
allowToolkitInit(foboajs.Toolkit.AJSUIBootstrap250,
"fobo" :: "ui-bootstrap.js" :: Nil) must_== true
}
"rewrit fobo/ui-bootstrap.js to fobo/angular-ui/bootstrap/2.4.0/js/ui-bootstrap-2.4.0.min.js" in {
rewriteToolkitInit(foboajs.Toolkit.AJSUIBootstrap240,
"rewrit fobo/ui-bootstrap.js to fobo/angular-ui/bootstrap/2.5.0/js/ui-bootstrap-2.5.0.min.js" in {
rewriteToolkitInit(foboajs.Toolkit.AJSUIBootstrap250,
"fobo" :: "ui-bootstrap.js" :: Nil) must_==
List("fobo",
"angular-ui",
"bootstrap",
"2.4.0",
"2.5.0",
"js",
"ui-bootstrap-2.4.0.min.js")
"ui-bootstrap-2.5.0.min.js")
}
}

"With foboajs.Resource.init set to foboajs.Resource.AJSUIBootstrap240 the ResourceServer" should {
"With foboajs.Resource.init set to foboajs.Resource.AJSUIBootstrap250 the ResourceServer" should {
"allow fobo/ui-bootstrap.js" in {
allowResource(foboajs.Resource.AJSUIBootstrap240,
allowResource(foboajs.Resource.AJSUIBootstrap250,
"fobo" :: "ui-bootstrap.js" :: Nil) must_== true
}
"rewrit fobo/ui-bootstrap.js to fobo/angular-ui/bootstrap/2.4.0/js/ui-bootstrap-2.4.0.min.js" in {
rewriteResource(foboajs.Resource.AJSUIBootstrap240,
"rewrit fobo/ui-bootstrap.js to fobo/angular-ui/bootstrap/2.5.0/js/ui-bootstrap-2.5.0.min.js" in {
rewriteResource(foboajs.Resource.AJSUIBootstrap250,
"fobo" :: "ui-bootstrap.js" :: Nil) must_==
List("fobo",
"angular-ui",
"bootstrap",
"2.4.0",
"2.5.0",
"js",
"ui-bootstrap-2.4.0.min.js")
"ui-bootstrap-2.5.0.min.js")
}
}

Expand Down
20 changes: 10 additions & 10 deletions FoBo/FoBo/src/main/scala/net/liftmodules/fobo/fobo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -391,20 +391,20 @@ package object fobo {
}

/**
* Enable usage of FoBo's Angular API and AngularUI-Bootstrap resources version 2․4․0 in your bootstrap liftweb Boot.
* @version 2.4.0
* Enable usage of FoBo's Angular API and AngularUI-Bootstrap resources version 2․5․0 in your bootstrap liftweb Boot.
* @version 2.5.0
*
* '''Example:'''
*
* {{{
* import net.liftmodules.fobo
* :
* fobo.Toolkit.init=fobo.Toolkit.AJSUIBootstrap240
* fobo.Toolkit.init=fobo.Toolkit.AJSUIBootstrap250
* }}}
*
*/
case object AJSUIBootstrap240 extends Toolkit {
net.liftmodules.foboajs.Toolkit.AJSUIBootstrap240
case object AJSUIBootstrap250 extends Toolkit {
net.liftmodules.foboajs.Toolkit.AJSUIBootstrap250
}

/**
Expand Down Expand Up @@ -1306,20 +1306,20 @@ package object fobo {
}

/**
* Enable usage of AngularUI-Bootstrap version 2․4․0 resource files in your bootstrap liftweb Boot.
* @version 2.4.0
* Enable usage of AngularUI-Bootstrap version 2․5․0 resource files in your bootstrap liftweb Boot.
* @version 2.5.0
*
* '''Example:'''
*
* {{{
* import net.liftmodules.fobo
* :
* fobo.Resource.init=fobo.Resource.AJSUIBootstrap240
* fobo.Resource.init=fobo.Resource.AJSUIBootstrap250
* }}}
*
*/
case object AJSUIBootstrap240 extends Resource {
net.liftmodules.foboajs.Resource.AJSUIBootstrap240
case object AJSUIBootstrap250 extends Resource {
net.liftmodules.foboajs.Resource.AJSUIBootstrap250
}

/**
Expand Down
26 changes: 13 additions & 13 deletions FoBo/FoBo/src/test/scala/net/liftmodules/fobo/FoBoSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -369,38 +369,38 @@ object FoBoSpec extends Specification {
}
}

//AJSUIBootstrap240
"With fobo.Toolkit.init set to fobo.Toolkit.AJSUIBootstrap240 the ResourceServer" should {
//AJSUIBootstrap250
"With fobo.Toolkit.init set to fobo.Toolkit.AJSUIBootstrap250 the ResourceServer" should {
"allow fobo/ui-bootstrap.js" in {
allowToolkitInit(fobo.Toolkit.AJSUIBootstrap240,
allowToolkitInit(fobo.Toolkit.AJSUIBootstrap250,
"fobo" :: "ui-bootstrap.js" :: Nil) must_== true
}
"rewrit fobo/ui-bootstrap.js to fobo/angular-ui/bootstrap/0.10.0/js/ui-bootstrap-0.10.0.min.js" in {
rewriteToolkitInit(fobo.Toolkit.AJSUIBootstrap240,
"rewrit fobo/ui-bootstrap.js to fobo/angular-ui/bootstrap/2.5.0/js/ui-bootstrap-2.5.0.min.js" in {
rewriteToolkitInit(fobo.Toolkit.AJSUIBootstrap250,
"fobo" :: "ui-bootstrap.js" :: Nil) must_==
List("fobo",
"angular-ui",
"bootstrap",
"2.4.0",
"2.5.0",
"js",
"ui-bootstrap-2.4.0.min.js")
"ui-bootstrap-2.5.0.min.js")
}
}

"With fobo.Resource.init set to fobo.Resource.AJSUIBootstrap240 the ResourceServer" should {
"With fobo.Resource.init set to fobo.Resource.AJSUIBootstrap250 the ResourceServer" should {
"allow fobo/ui-bootstrap.js" in {
allowResource(fobo.Resource.AJSUIBootstrap240,
allowResource(fobo.Resource.AJSUIBootstrap250,
"fobo" :: "ui-bootstrap.js" :: Nil) must_== true
}
"rewrit fobo/ui-bootstrap.js to fobo/angular-ui/bootstrap/2.4.0/js/ui-bootstrap-2.4.0.min.js" in {
rewriteResource(fobo.Resource.AJSUIBootstrap240,
"rewrit fobo/ui-bootstrap.js to fobo/angular-ui/bootstrap/2.5.0/js/ui-bootstrap-2.5.0.min.js" in {
rewriteResource(fobo.Resource.AJSUIBootstrap250,
"fobo" :: "ui-bootstrap.js" :: Nil) must_==
List("fobo",
"angular-ui",
"bootstrap",
"2.4.0",
"2.5.0",
"js",
"ui-bootstrap-2.4.0.min.js")
"ui-bootstrap-2.5.0.min.js")
}
}

Expand Down

0 comments on commit 16c7d82

Please sign in to comment.