photoviewer 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +842 -0
- data/README +33 -0
- data/Rakefile +38 -0
- data/app/controllers/application.rb +28 -0
- data/app/controllers/list_controller.rb +86 -0
- data/app/helpers/application_helper.rb +20 -0
- data/app/helpers/list_helper.rb +19 -0
- data/app/models/list.rb +19 -0
- data/app/views/list/banner.html.erb +148 -0
- data/app/views/list/images.xml +8 -0
- data/app/views/list/index.html.erb +46 -0
- data/app/views/list/promo.html.erb +89 -0
- data/app/views/list/response.xml +1 -0
- data/app/views/list/set_index.html.erb +77 -0
- data/app/views/list/view.html.erb +150 -0
- data/catalog.xml +4 -0
- data/config/boot.rb +109 -0
- data/config/database.yml +24 -0
- data/config/environment.rb +62 -0
- data/config/environments/development.rb +18 -0
- data/config/environments/production.rb +19 -0
- data/config/environments/test.rb +22 -0
- data/config/initializers/inflections.rb +10 -0
- data/config/initializers/mime_types.rb +5 -0
- data/config/rmobio.yml +10 -0
- data/config/routes.rb +37 -0
- data/coverage/app-controllers-application_rb.html +659 -0
- data/coverage/app-controllers-list_controller_rb.html +717 -0
- data/coverage/app-helpers-application_helper_rb.html +651 -0
- data/coverage/app-helpers-list_helper_rb.html +650 -0
- data/coverage/index.html +390 -0
- data/db/schema.rb +14 -0
- data/doc/README_FOR_APP +2 -0
- data/log/development.log +675 -0
- data/log/test.log +630 -0
- data/public/404.html +30 -0
- data/public/422.html +30 -0
- data/public/500.html +30 -0
- data/public/dispatch.cgi +10 -0
- data/public/dispatch.fcgi +24 -0
- data/public/dispatch.rb +10 -0
- data/public/favicon.ico +0 -0
- data/public/images/bn/afp.png +0 -0
- data/public/images/bn/airtel.png +0 -0
- data/public/images/bn/bpl.png +0 -0
- data/public/images/bn/imobizo.png +0 -0
- data/public/images/bn/toi.png +0 -0
- data/public/images/bn/trivia.png +0 -0
- data/public/images/cricket.png +0 -0
- data/public/images/default_state_icon.png +0 -0
- data/public/images/mobio_small.png +0 -0
- data/public/images/rails.png +0 -0
- data/public/images/time_small.png +0 -0
- data/public/images/title_icon.png +0 -0
- data/public/index.html +277 -0
- data/public/javascripts/application.js +2 -0
- data/public/javascripts/controls.js +963 -0
- data/public/javascripts/dragdrop.js +972 -0
- data/public/javascripts/effects.js +1120 -0
- data/public/javascripts/prototype.js +4225 -0
- data/public/robots.txt +5 -0
- data/public/stylesheets/scaffold.css +74 -0
- data/script/about +3 -0
- data/script/console +3 -0
- data/script/destroy +3 -0
- data/script/generate +3 -0
- data/script/performance/benchmarker +3 -0
- data/script/performance/profiler +3 -0
- data/script/performance/request +3 -0
- data/script/plugin +3 -0
- data/script/process/inspector +3 -0
- data/script/process/reaper +3 -0
- data/script/process/spawner +3 -0
- data/script/runner +3 -0
- data/script/server +3 -0
- data/test/functional/list_controller_test.rb +25 -0
- data/test/test_helper.rb +55 -0
- data/test/unit/list_test.rb +25 -0
- metadata +184 -0
data/README
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2007 Mobio Networks, Inc.
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
#
|
17
|
+
|
18
|
+
This is a sample application demonstrating the features of the rmobio
|
19
|
+
rubygem.
|
20
|
+
|
21
|
+
For more information, please visit the rubyforge home page:
|
22
|
+
|
23
|
+
http://rubyforge.org/projects/rmobio/
|
24
|
+
|
25
|
+
Or you can go directly to the wiki:
|
26
|
+
|
27
|
+
http://dev.getmobio.com/wiki/
|
28
|
+
|
29
|
+
|
30
|
+
License:
|
31
|
+
GNU Lesser General Public License (LGPL)
|
32
|
+
|
33
|
+
http://www.gnu.org/licenses/lgpl.html
|
data/Rakefile
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2007 Mobio Networks, Inc.
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
#
|
17
|
+
|
18
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
19
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
20
|
+
|
21
|
+
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
|
22
|
+
|
23
|
+
require 'rake'
|
24
|
+
require 'rake/testtask'
|
25
|
+
require 'rake/rdoctask'
|
26
|
+
|
27
|
+
require 'tasks/rails'
|
28
|
+
|
29
|
+
PKG_NAME = 'photoviewer'
|
30
|
+
PKG_VERSION = '1.1.0'
|
31
|
+
PKG_DIR = 'pkg'
|
32
|
+
PKG_SUMMARY = 'PhotoViewer Sample Application'
|
33
|
+
PKG_AUTHORS = ['Jenny Chang']
|
34
|
+
PKG_EMAILS = ['jchang@getmobio.com']
|
35
|
+
PKG_HOMEPAGE = ''
|
36
|
+
PKG_DESCRIPTION = ''
|
37
|
+
DEP_ADD = true
|
38
|
+
require 'rmobio/raketasks'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2007 Mobio Networks, Inc.
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
#
|
17
|
+
|
18
|
+
# Filters added to this controller apply to all controllers in the application.
|
19
|
+
# Likewise, all the methods added will be available for all controllers.
|
20
|
+
|
21
|
+
class ApplicationController < ActionController::Base
|
22
|
+
helper :all # include all helpers, all the time
|
23
|
+
|
24
|
+
# See ActionController::RequestForgeryProtection for details
|
25
|
+
# Uncomment the :secret if you're not using the cookie session store
|
26
|
+
protect_from_forgery # :secret => '3f785f6d60eafca53aa5d18a5f4617ff'
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2007 Mobio Networks, Inc.
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
#
|
17
|
+
|
18
|
+
class ListController < ApplicationController
|
19
|
+
before_filter :checkClient
|
20
|
+
|
21
|
+
def index
|
22
|
+
end
|
23
|
+
def get_images
|
24
|
+
# get all images in images directory or bn directory
|
25
|
+
if params[:bn].nil?
|
26
|
+
imgs = File::join RAILS_ROOT, 'public/images/*png'
|
27
|
+
else
|
28
|
+
imgs = File::join RAILS_ROOT, 'public/images/bn/*png'
|
29
|
+
end
|
30
|
+
files = Dir[imgs]
|
31
|
+
@names = []
|
32
|
+
files.each do |x|
|
33
|
+
filename = File.basename(x)
|
34
|
+
img = []
|
35
|
+
img[0] = filename
|
36
|
+
filename = params[:bn] + '/' + filename if params[:bn]
|
37
|
+
img[1] = filename
|
38
|
+
@names << img
|
39
|
+
end
|
40
|
+
headers['Content-Type']='application/xml'
|
41
|
+
response = "<data/>"
|
42
|
+
render :template => 'list/images.xml'
|
43
|
+
end
|
44
|
+
|
45
|
+
# Log when image is viewed
|
46
|
+
def send_log
|
47
|
+
logger.info('***** Viewed image with id: ' + params[:id])
|
48
|
+
|
49
|
+
# Have to send some dummy back otherwise server chokes on nullpointer exception
|
50
|
+
headers['Content-Type']='application/xml'
|
51
|
+
render :template => 'list/response.xml'
|
52
|
+
end
|
53
|
+
|
54
|
+
def banner
|
55
|
+
# Get ad server url from config manager
|
56
|
+
@ad_url = MOBIO_CONFIG['adserver_url']
|
57
|
+
end
|
58
|
+
|
59
|
+
def view
|
60
|
+
# Get ad server url from config manager
|
61
|
+
@ad_url = MOBIO_CONFIG['adserver_url']
|
62
|
+
end
|
63
|
+
|
64
|
+
def sponsor
|
65
|
+
headers['Content-Type']='application/xml'
|
66
|
+
response = '<data xmlns=""><info>sponsor ' + params[:id] + '</info></data>'
|
67
|
+
render :template => 'list/response.xml'
|
68
|
+
end
|
69
|
+
|
70
|
+
# handle backurl to home
|
71
|
+
def storeBackurl
|
72
|
+
backURL("recipe_burl")
|
73
|
+
end
|
74
|
+
|
75
|
+
def set_index
|
76
|
+
end
|
77
|
+
def err
|
78
|
+
end
|
79
|
+
def err_response
|
80
|
+
end
|
81
|
+
def data_response
|
82
|
+
end
|
83
|
+
def promo
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2007 Mobio Networks, Inc.
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
#
|
17
|
+
|
18
|
+
# Methods added to this helper will be available to all templates in the application.
|
19
|
+
module ApplicationHelper
|
20
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2007 Mobio Networks, Inc.
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
#
|
17
|
+
|
18
|
+
module ListHelper
|
19
|
+
end
|
data/app/models/list.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2007 Mobio Networks, Inc.
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
#
|
17
|
+
|
18
|
+
class List < ActiveRecord::Base
|
19
|
+
end
|
@@ -0,0 +1,148 @@
|
|
1
|
+
<html id="root" xmlns="http://www.mobio.com/ext"
|
2
|
+
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
3
|
+
xmlns:xf="http://www.w3.org/2002/xforms"
|
4
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
5
|
+
xmlns:ext="http://www.mobio.com/ext"
|
6
|
+
xmlns:ev="http://www.w3.org/2001/xml-events">
|
7
|
+
<xhtml:head>
|
8
|
+
<xf:model>
|
9
|
+
<!-- Ask ad server for ads. -->
|
10
|
+
<xf:instance id="pData" src="<%=@ad_url%>"/>
|
11
|
+
<xf:instance id="admin">
|
12
|
+
<data xmlns="">
|
13
|
+
<id/>
|
14
|
+
</data>
|
15
|
+
</xf:instance>
|
16
|
+
<xf:instance id="idx">
|
17
|
+
<data xmlns="">
|
18
|
+
<info>blah</info>
|
19
|
+
</data>
|
20
|
+
</xf:instance>
|
21
|
+
<xf:submission
|
22
|
+
action="send_log"
|
23
|
+
method="post" id="log" includenamespaceprefixes=""
|
24
|
+
replace="instance" instance="idx" ref="instance('admin')">
|
25
|
+
<param name="backgroundLoad"/>
|
26
|
+
</xf:submission>
|
27
|
+
<xf:submission
|
28
|
+
action="sponsor"
|
29
|
+
method="post" id="sponsor" includenamespaceprefixes=""
|
30
|
+
replace="instance" instance="idx" ref="instance('admin')">
|
31
|
+
|
32
|
+
</xf:submission>
|
33
|
+
<xf:bind nodeset="player/backward" relevant="index('imgview') > 1"/>
|
34
|
+
<xf:bind nodeset="player/forward" relevant="index('imgview') < count(instance('pData')/images/image)"/>
|
35
|
+
|
36
|
+
</xf:model>
|
37
|
+
|
38
|
+
<style>
|
39
|
+
<class name="body">
|
40
|
+
<background-color value="#66CC00"/>
|
41
|
+
</class>
|
42
|
+
<class name="img">
|
43
|
+
<background-color value="transparent"/>
|
44
|
+
<border value="1"/>
|
45
|
+
<border-color value="#0"/>
|
46
|
+
<margin value="1"/>
|
47
|
+
</class>
|
48
|
+
|
49
|
+
<class name="img:focused">
|
50
|
+
<border value="1"/>
|
51
|
+
<border-color value="#FF0000"/>
|
52
|
+
</class>
|
53
|
+
<class name="tb">
|
54
|
+
<scrollbar value="show" />
|
55
|
+
<font-weight value="bold" />
|
56
|
+
<background-color value="transparent" />
|
57
|
+
</class>
|
58
|
+
<class name="tb:focused">
|
59
|
+
<background-color value="#ffffff" />
|
60
|
+
<font-weight value="bold" />
|
61
|
+
</class>
|
62
|
+
|
63
|
+
<class name="line">
|
64
|
+
<background-color value="#FF0000" />
|
65
|
+
</class>
|
66
|
+
|
67
|
+
<class name="popup-menu">
|
68
|
+
<background-color value="#ffffff" />
|
69
|
+
<border-color value="#000000" />
|
70
|
+
<border value="1" />
|
71
|
+
<margin value="0,0,2,2" />
|
72
|
+
</class>
|
73
|
+
</style>
|
74
|
+
</xhtml:head>
|
75
|
+
|
76
|
+
<xhtml:body style="body">
|
77
|
+
<xf:setfocus control="cricket" ev:event="xforms-ready" ev:observer="root"/>
|
78
|
+
<output height="1ex" value="concat('Banner ads provided by: ', instance('idx')/info)"/>
|
79
|
+
<output height="1ex" value="index('imgview')"/>
|
80
|
+
<hstack height="1ex"/>
|
81
|
+
<textoutput height="4ex">Banner image should start automatically. Select Sponsor softkey should output the sponsor id whose image is currently displayed.
|
82
|
+
</textoutput>
|
83
|
+
|
84
|
+
<image id="imgview" height="2ex"
|
85
|
+
nodeset="instance('pData')/ads/ad/image_url" style="img"
|
86
|
+
delay="2" autoplay="true">
|
87
|
+
<item>
|
88
|
+
<xf:action ev:event="DOMActivate">
|
89
|
+
<xf:load ref="instance('pData')/ads/ad/action_url"/>
|
90
|
+
</xf:action>
|
91
|
+
</item>
|
92
|
+
|
93
|
+
</image>
|
94
|
+
<tab id="cricket">
|
95
|
+
<case id="first" label="PRESENT" style="tb">
|
96
|
+
|
97
|
+
<vstack height="1%" style="line" />
|
98
|
+
<output height="1ex">Cricket Matches</output>
|
99
|
+
|
100
|
+
<button height="1ex" >
|
101
|
+
<label>Test grid image</label>
|
102
|
+
|
103
|
+
<xf:action ev:event="DOMActivate">
|
104
|
+
<xf:setindex refid="imgview" index="index('imgview')+1" />
|
105
|
+
</xf:action>
|
106
|
+
<xf:action ev:event="DOMActivate" value="index('imgview') = count(instance('pData')/images/image)">
|
107
|
+
<xf:setindex refid="imgview" index="number('1')"/>
|
108
|
+
</xf:action>
|
109
|
+
</button>
|
110
|
+
|
111
|
+
<input height="1ex" ref="instance('idx')/info"/>
|
112
|
+
</case>
|
113
|
+
<case id="second" label="PAST" style="tb">
|
114
|
+
<vstack height="1%" style="line" />
|
115
|
+
<output height="1ex">Past Matches</output>
|
116
|
+
<input height="1ex" ref="instance('idx')/info"/>
|
117
|
+
</case>
|
118
|
+
<case id="third" label="FUTURE" style="tb">
|
119
|
+
<vstack height="1%" style="line" />
|
120
|
+
<output height="1ex">TBD</output>
|
121
|
+
<input height="1ex" ref="instance('idx')/info"/>
|
122
|
+
</case>
|
123
|
+
|
124
|
+
<xf:action ev:event="xforms-select">
|
125
|
+
<xf:setindex refid="imgview" index="index('imgview')+1" />
|
126
|
+
</xf:action>
|
127
|
+
<xf:action ev:event="xforms-select" value="index('imgview') = count(instance('pData')/images/image)">
|
128
|
+
<xf:setindex refid="imgview" index="number('1')"/>
|
129
|
+
</xf:action>
|
130
|
+
</tab>
|
131
|
+
<footer>
|
132
|
+
<softkey position="1">
|
133
|
+
<label>Back</label>
|
134
|
+
<back ev:event="DOMActivate"/>
|
135
|
+
</softkey>
|
136
|
+
|
137
|
+
<softkey position="3">
|
138
|
+
<label>Sponsor</label>
|
139
|
+
<xf:action ev:event="DOMActivate">
|
140
|
+
|
141
|
+
<xf:setvalue ref="instance('admin')/id" value="index('imgview')"/>
|
142
|
+
<xf:send submission="sponsor" ev:event="DOMActivate"/>
|
143
|
+
</xf:action>
|
144
|
+
</softkey>
|
145
|
+
</footer>
|
146
|
+
|
147
|
+
</xhtml:body>
|
148
|
+
</html>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<html id="root" xmlns="http://www.mobio.com/ext"
|
2
|
+
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
3
|
+
xmlns:xf="http://www.w3.org/2002/xforms"
|
4
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
5
|
+
xmlns:ext="http://www.mobio.com/ext"
|
6
|
+
xmlns:ev="http://www.w3.org/2001/xml-events">
|
7
|
+
<xhtml:head>
|
8
|
+
<xf:model>
|
9
|
+
<xf:submission action="view" method="get" id="view"/>
|
10
|
+
<xf:submission action="banner" method="get" id="banner"/>
|
11
|
+
<xf:submission action="banner2" method="get" id="banner2"/>
|
12
|
+
|
13
|
+
<!-- backurl -->
|
14
|
+
<xf:instance id="homepage"
|
15
|
+
src="storeBackurl?burl=${burl}" />
|
16
|
+
</xf:model>
|
17
|
+
|
18
|
+
</xhtml:head>
|
19
|
+
|
20
|
+
<xhtml:body style="body">
|
21
|
+
<output height="1ex">Test Image</output>
|
22
|
+
<output height="1ex" ref="instance('admin')/burl"/>
|
23
|
+
<button height="1ex" >
|
24
|
+
<label>Test Banner Image</label>
|
25
|
+
<xf:send submission="banner" ev:event="DOMActivate" />
|
26
|
+
</button>
|
27
|
+
|
28
|
+
<button height="1ex" >
|
29
|
+
<label>Test grid image</label>
|
30
|
+
<xf:send submission="view" ev:event="DOMActivate" />
|
31
|
+
</button>
|
32
|
+
|
33
|
+
<footer>
|
34
|
+
<softkey position="1">
|
35
|
+
<label>Back</label>
|
36
|
+
<xf:load ev:event="DOMActivate" >
|
37
|
+
<xf:resource value="instance('homepage')/burl"/>
|
38
|
+
</xf:load>
|
39
|
+
</softkey>
|
40
|
+
<softkey position="3">
|
41
|
+
<label>Refresh</label>
|
42
|
+
<xf:load ev:event="DOMActivate" resource="index"/>
|
43
|
+
</softkey>
|
44
|
+
</footer>
|
45
|
+
</xhtml:body>
|
46
|
+
</html>
|
@@ -0,0 +1,89 @@
|
|
1
|
+
<html id="root" xmlns="http://www.mobio.com/ext"
|
2
|
+
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
3
|
+
xmlns:xf="http://www.w3.org/2002/xforms"
|
4
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
5
|
+
xmlns:ext="http://www.mobio.com/ext"
|
6
|
+
xmlns:ev="http://www.w3.org/2001/xml-events">
|
7
|
+
<xhtml:head>
|
8
|
+
<xf:model>
|
9
|
+
<xf:instance>
|
10
|
+
<data xmlns="">
|
11
|
+
<tel/>
|
12
|
+
</data>
|
13
|
+
</xf:instance>
|
14
|
+
</xf:model>
|
15
|
+
<style xmlns:m="http://www.mobio.com/ext">
|
16
|
+
<class name="bc">
|
17
|
+
<background-color value="#FFFFFF" />
|
18
|
+
</class>
|
19
|
+
<class name="footer">
|
20
|
+
<background-color value="#FFFFFF" />
|
21
|
+
<font-weight value="bold" />
|
22
|
+
</class>
|
23
|
+
<class name="acb" parent="ac">
|
24
|
+
<font-weight value="bold" />
|
25
|
+
</class>
|
26
|
+
<class name="bold">
|
27
|
+
<font-weight value="bold" />
|
28
|
+
</class>
|
29
|
+
<class name="line">
|
30
|
+
<background-color value="#FF0000" />
|
31
|
+
</class>
|
32
|
+
<class name="savebutton">
|
33
|
+
<background-color value="#FFFFFF" />
|
34
|
+
<border-color value="#0"/>
|
35
|
+
<border value="1" />
|
36
|
+
<font-weight value="bold" />
|
37
|
+
</class>
|
38
|
+
<class name="savebutton:focused">
|
39
|
+
<background-color value="#FF0000" />
|
40
|
+
<font-color value="#FFFFFF" />
|
41
|
+
<border-color value="#0"/>
|
42
|
+
<border value="1" />
|
43
|
+
<font-weight value="bold" />
|
44
|
+
</class>
|
45
|
+
|
46
|
+
<class name="combo">
|
47
|
+
<background-color value="transparent" />
|
48
|
+
<border value="1" />
|
49
|
+
<border-color value="#000000" />
|
50
|
+
<font-weight value="bold" />
|
51
|
+
</class>
|
52
|
+
<class name="combo:focused">
|
53
|
+
<background-color value="#E1E4C6" />
|
54
|
+
</class>
|
55
|
+
<class name="m1">
|
56
|
+
<margin value="4"/>
|
57
|
+
</class>
|
58
|
+
</style>
|
59
|
+
</xhtml:head>
|
60
|
+
|
61
|
+
<xhtml:body style="bc">
|
62
|
+
<image height="2ex">images/bn/afp.png</image>
|
63
|
+
<vstack height="1%" style="line" />
|
64
|
+
<textoutput height="0">Enter your phone number to win swimsuit calendar.</textoutput>
|
65
|
+
<hstack height="1ex"/>
|
66
|
+
<vstack height="0">
|
67
|
+
<hstack height="0" width="90%" >
|
68
|
+
<output height="1ex" width="12em" value="'Phone #:'" />
|
69
|
+
|
70
|
+
<input style="combo" height="1ex" type="xsd:integer" ref="/data/tel" />
|
71
|
+
</hstack>
|
72
|
+
</vstack>
|
73
|
+
|
74
|
+
|
75
|
+
<hstack height="0" style="m1">
|
76
|
+
<output height="1ex"/>
|
77
|
+
<button height="1ex" style="savebutton" width="40%">
|
78
|
+
<label style="acb">Submit</label>
|
79
|
+
<back ev:event="DOMActivate"/>
|
80
|
+
</button>
|
81
|
+
<output height="1ex"/>
|
82
|
+
</hstack>
|
83
|
+
<softkey position="1" style="bold">
|
84
|
+
<label>Back</label>
|
85
|
+
<back ev:event="DOMActivate"/>
|
86
|
+
</softkey>
|
87
|
+
<footer style="footer" />
|
88
|
+
</xhtml:body>
|
89
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%=@response%>
|
@@ -0,0 +1,77 @@
|
|
1
|
+
<html id="root" xmlns="http://www.mobio.com/ext"
|
2
|
+
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
3
|
+
xmlns:xf="http://www.w3.org/2002/xforms"
|
4
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
5
|
+
xmlns:ext="http://www.mobio.com/ext"
|
6
|
+
xmlns:ev="http://www.w3.org/2001/xml-events">
|
7
|
+
<xhtml:head>
|
8
|
+
<xf:model>
|
9
|
+
<xf:submission action="view" method="get" id="view"/>
|
10
|
+
<xf:submission action="banner" method="get" id="banner"/>
|
11
|
+
<xf:submission action="banner2" method="get" id="banner2"/>
|
12
|
+
|
13
|
+
<xf:instance id="pData">
|
14
|
+
|
15
|
+
<data xmlns="">
|
16
|
+
<images>
|
17
|
+
|
18
|
+
<image label="cricket.png">../images/cricket.png</image>
|
19
|
+
<image label="default_state_icon.png">../images/default_state_icon.png</image>
|
20
|
+
<image label="mobio_small.png">../images/mobio_small.png</image>
|
21
|
+
<image label="time_small.png">../images/time_small.png</image>
|
22
|
+
<image label="title_icon.png">../images/title_icon.png</image>
|
23
|
+
|
24
|
+
</images>
|
25
|
+
</data>
|
26
|
+
</xf:instance>
|
27
|
+
<xf:instance id="ll">
|
28
|
+
<data xmlns="">
|
29
|
+
<item label="1">item1</item>
|
30
|
+
<item label="2">item2</item>
|
31
|
+
<item label="3">item3</item>
|
32
|
+
<item label="4">item4</item>
|
33
|
+
</data>
|
34
|
+
</xf:instance>
|
35
|
+
</xf:model>
|
36
|
+
|
37
|
+
</xhtml:head>
|
38
|
+
|
39
|
+
<xhtml:body style="body">
|
40
|
+
<xf:action ev:event="xforms-ready" ev:observer="root">
|
41
|
+
<xf:setindex refid="imgview" index="number('3')"/>
|
42
|
+
<xf:setindex refid="mylist" index="number('3')"/>
|
43
|
+
</xf:action>
|
44
|
+
|
45
|
+
<slist>
|
46
|
+
<itemset id="mylist" nodeset="instance('ll')/item">
|
47
|
+
<item height="0">
|
48
|
+
<output height="1ex" ref="@label"/>
|
49
|
+
<output height="1ex" ref="."/>
|
50
|
+
</item>
|
51
|
+
</itemset>
|
52
|
+
</slist>
|
53
|
+
|
54
|
+
<image id="imgview"
|
55
|
+
nodeset="instance('pData')/images/image" style="img" delay="2">
|
56
|
+
|
57
|
+
</image>
|
58
|
+
<output height="1ex">Test Image</output>
|
59
|
+
|
60
|
+
<button height="1ex" >
|
61
|
+
<label>Test Banner Image</label>
|
62
|
+
<xf:send submission="banner" ev:event="DOMActivate" />
|
63
|
+
</button>
|
64
|
+
|
65
|
+
<button height="1ex" >
|
66
|
+
<label>Test grid image</label>
|
67
|
+
<xf:send submission="view" ev:event="DOMActivate" />
|
68
|
+
</button>
|
69
|
+
|
70
|
+
<footer>
|
71
|
+
<softkey position="1">
|
72
|
+
<label>Refresh</label>
|
73
|
+
<xf:load ev:event="DOMActivate" resource="set_index"/>
|
74
|
+
</softkey>
|
75
|
+
</footer>
|
76
|
+
</xhtml:body>
|
77
|
+
</html>
|