Skip to content

Commit

Permalink
0.34 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Vahid committed Mar 4, 2014
1 parent 31b5c73 commit faa51ab
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -8,7 +8,7 @@ This example grails project uses :

https://github.com/vahidhedayati/ajaxdependancyselection

# Updated to work with ajaxdependancyselection 0.27
# Updated to work with ajaxdependancyselection 0.34


I have added extra options to the main page to give access to other examples and domain classes if new records are required for the test.
Expand Down Expand Up @@ -77,7 +77,7 @@ Project changes made to make this work:
Added to: https://github.com/vahidhedayati/ajaxdependancyselectexample/blob/master/grails-app/conf/BuildConfig.groovy

// EXTRAS ADDED TO MAKE THIS EXAMPLE PROJECT WORK
compile ":ajaxdependancyselection:0.27"
compile ":ajaxdependancyselection:0.34"
compile ":jquery-ui:1.10.3"


Expand Down
23 changes: 23 additions & 0 deletions grails-app/conf/BootStrap.groovy
@@ -1,13 +1,16 @@

import grails.transaction.Transactional
import ajaxdependancyselectexample.Computers
import ajaxdependancyselectexample.Departments
import ajaxdependancyselectexample.Documents
import ajaxdependancyselectexample.Employee
import ajaxdependancyselectexample.MyCity
import ajaxdependancyselectexample.MyContinent
import ajaxdependancyselectexample.MyCountry
import ajaxdependancyselectexample.MyShops
import ajaxdependancyselectexample.Os
import ajaxdependancyselectexample.Streets
import ajaxdependancyselectexample.Users
@Transactional
class BootStrap {

Expand Down Expand Up @@ -38,6 +41,26 @@ class BootStrap {

def dgg4=d2.addToOffices(name:'Wales').save(flush:true)

def ccc1=Computers.findOrSaveWhere(department:d1, pcName:'AXM-tqw')
Computers.findOrSaveWhere(department:d1, pcName:'BXM-lpt')
Computers.findOrSaveWhere(department:d1, pcName:'SXM-abf')
def ccc2=Computers.findOrSaveWhere(department:d2, pcName:'gjb-aabf')
Computers.findOrSaveWhere(department:d2, pcName:'otr-aaf')
Computers.findOrSaveWhere(department:d2, pcName:'por-adf')

Os.findOrSaveWhere(computers:ccc1, osName:'Windows')
Os.findOrSaveWhere(computers:ccc1, osName:'Mac')
Os.findOrSaveWhere(computers:ccc2, osName:'Redhat')
Os.findOrSaveWhere(computers:ccc2, osName:'Centos')

Users.findOrSaveWhere(computers:ccc2, userName:'Gill')
Users.findOrSaveWhere(computers:ccc2, userName:'Kevin')
Users.findOrSaveWhere(computers:ccc2, userName:'Sam')

Users.findOrSaveWhere(computers:ccc1, userName:'Joe')
Users.findOrSaveWhere(computers:ccc1, userName:'Mark')
Users.findOrSaveWhere(computers:ccc1, userName:'Jackie')


// Create continents
def n1=MyContinent.findOrSaveWhere(continentName: 'Asia')
Expand Down
2 changes: 1 addition & 1 deletion grails-app/conf/BuildConfig.groovy
Expand Up @@ -72,7 +72,7 @@ grails.project.dependency.resolution = {


// Uncomment this to use live plugin
compile ":ajaxdependancyselection:0.33"
compile ":ajaxdependancyselection:0.34"
}
}
//grails.plugin.location.'ajaxdependancyselection' = "../ajaxdependancyselection"
Expand Up @@ -3,7 +3,7 @@ package ajaxdependancyselectexample
class Departments {

String name
static hasMany=[employees: Employee, offices: Offices, documents: Documents]
static hasMany=[employees: Employee, offices: Offices, documents: Documents, computers:Computers]
String toString() { "${name}"}
static constraints = {
}
Expand Down
12 changes: 6 additions & 6 deletions grails-app/views/_menubar.gsp
Expand Up @@ -13,18 +13,18 @@
<li><g:link class="list" controller="MyContinent" action="selectPrimaryNRFiltering"><g:message code="selectPrimaryNRFiltering" args="[entityName]" /></g:link></li>
<li><g:link class="list" controller="MyContinent" action="norefselectSecondaryFiltering"><g:message code="norefselectSecondaryFiltering" args="[entityName]" /></g:link></li>
<li><g:link class="list" controller="MyContinent" action="norefselectSecondaryFilteringFixed"><g:message code="norefselectSecondaryFiltering Fixed Term lookup" args="[entityName]" /></g:link></li>

<li><g:link class="list" controller="MyContinent" action="multidomainexample"><g:message code="Call multiple domains from one object" args="[entityName]" /></g:link></li>

</ul>
</div>
<div class="nav" role="navigation">
<ul>
<li><g:link class="list" controller="MyContinent" action="list"><g:message code="MyContinent" args="[entityName]" /></g:link></li>
<li><g:link class="list" controller="MyCountry" action="list"><g:message code="country" args="[entityName]" /></g:link></li>
<li><g:link class="list" controller="MyCity" action="list"><g:message code="city" args="[entityName]" /></g:link></li>
<li><g:link class="list" controller="MyBorough" action="list"><g:message code="Borough" args="[entityName]" /></g:link></li>
<li><g:link class="list" controller="MyContinent" action="index"><g:message code="MyContinent" args="[entityName]" /></g:link></li>
<li><g:link class="list" controller="MyCountry" action="index"><g:message code="country" args="[entityName]" /></g:link></li>
<li><g:link class="list" controller="MyCity" action="index"><g:message code="city" args="[entityName]" /></g:link></li>
<li><g:link class="list" controller="MyBorough" action="index"><g:message code="Borough" args="[entityName]" /></g:link></li>

<li><g:link class="list" controller="Streets" action="list"><g:message code="streets" args="[entityName]" /></g:link></li>
<li><g:link class="list" controller="Streets" action="index"><g:message code="streets" args="[entityName]" /></g:link></li>
<li><g:link class="list" controller="Departments" action="index"><g:message code="depts" args="[entityName]" /></g:link></li>
<li><g:link class="list" controller="Employee" action="index"><g:message code="employee" args="[entityName]" /></g:link></li>
</ul>
Expand Down

0 comments on commit faa51ab

Please sign in to comment.