1) {
148 | top = (Math.floor(cellIndex / column) * (cell + gutter)) + gutter;
149 | }
150 | left = ((cellIndex % column) * (cell + gutter)) + gutter;
151 |
152 | for (var j=1, jj = column * rowSize - rowSize * rowSize + 1; j <= jj; j++) {
153 | if (!item['photo_' + j]) {
154 | item[ 'photo_' + j] = { data: photo.data, image: photo.url, width: rect, height: rect, top: top, left: left, visible: true };
155 |
156 | if (!isCurrentSection) {
157 | $.gallery.sections[sectionIndex].replaceItemsAt(rowIndex, 1, [item]);
158 | }
159 |
160 | break;
161 | }
162 | }
163 |
164 | continue;
165 | } else {
166 | /*
167 | if there is no available / fit position for this photo
168 | - we create a new row for it
169 | - store un-used position for later photos
170 | * */
171 | store(size);
172 | }
173 | } else {
174 | store(size);
175 | }
176 |
177 | items.push({
178 | template: 'template_' + size,
179 | photo_1: { data: photo.data, image: photo.url, width: rect, height: rect, top: top, left: left, visible: true }
180 | });
181 | };
182 |
183 | var section = Ti.UI.createListSection({ items: items });
184 | if (isReset === false) {
185 | $.gallery.appendSection(section);
186 | } else {
187 | $.gallery.sections = [section];
188 | }
189 |
190 | if (args.infinite) {
191 | $.gallery.setMarker({ sectionIndex: vars.sectionIndex, itemIndex: items.length - 2 });
192 | }
193 | } else if (isReset !== false) {
194 | $.gallery.sections = [ Ti.UI.createListSection({ items: [{ template: 'template_no_data' }] }) ];
195 | }
196 |
197 | toggleAI(false);
198 |
199 | // cleanup cache
200 | var cache = vars.sections[ vars.sectionIndex ];
201 | if (_.find(cache, function(row){ return row !== null; }) == undefined) {
202 | cache = null;
203 | }
204 | };
205 |
206 | function store(size) {
207 | var column = args.column,
208 | row;
209 |
210 | if (size < column) {
211 | row = [];
212 | for (var i=1; i <= size; i++) {
213 | for (var j=1; j <= column; j++) {
214 | row.push(j > size);
215 | };
216 | };
217 | } else {
218 | row = null;
219 | }
220 |
221 | var sections = vars.sections,
222 | index = vars.sectionIndex;
223 | if (sections[index]) {
224 | vars.sections[index].push(row);
225 | } else {
226 | vars.sections[index] = [row];
227 | }
228 | }
229 |
230 | function find(size) {
231 | var sections = vars.sections,
232 | column = args.column,
233 | found = false,
234 | sectionIndex,
235 | cellIndex,
236 | rowIndex,
237 | rowSize;
238 |
239 | for (var h = 0, hh = sections.length; h < hh; h++) {
240 | sectionIndex = h;
241 | var section = sections[h];
242 |
243 | if (section === null) { continue; }
244 |
245 | for (var i = 0, ii = section.length; i < ii; i++) {
246 | rowIndex = i;
247 | var row = section[i];
248 |
249 | if (row === null) { continue; }
250 |
251 | for(var j = 0, jj = row.length; j < jj; j++){
252 | if (row[j]) {
253 | cellIndex = j;
254 | rowSize = jj;
255 | var columnIndex = j % column + 1;
256 |
257 | if (size == 1) {
258 | found = true;
259 | row[j] = false;
260 | break;
261 | }
262 | // columnIndex from 1, 2 ..., 0 is the last column in row
263 | // size is > 1, so the last column is not fitted for this photo
264 | else if (columnIndex > 0) {
265 | var prev = columnIndex - 1,
266 | next = column - (prev + size),
267 | testIndex = cellIndex,
268 | cells = [];
269 |
270 | for (var k = 1; k <= size; k++) {
271 | k !== 1 && (testIndex += prev);
272 | for (var l = 1; l <= size; l++) {
273 | if (row[testIndex]) {
274 | cells.push(testIndex);
275 | testIndex++;
276 | } else {
277 | break;
278 | }
279 | };
280 | if (cells.length < k * size) {
281 | break;
282 | }
283 | testIndex += next;
284 | };
285 |
286 | if (cells.length >= size * size) {
287 | found = true;
288 | for (var k = 0, kk = cells.length; k < kk; k++) {
289 | row[ cells[k] ] = false;
290 | }
291 | break;
292 | }
293 | }
294 | }
295 | };
296 |
297 | if (row.indexOf(true) == -1) {
298 | section[i] = null;
299 | }
300 |
301 | if (found) {
302 | break;
303 | }
304 | };
305 |
306 | if (found) {
307 | break;
308 | }
309 | };
310 |
311 | return found ? { section: sectionIndex, row: rowIndex, cell: cellIndex, size: rowSize/column } : false;
312 | }
313 |
314 | function galleryClick(e) {
315 | if (e.bindId != null) {
316 | var data = e.section.items[ e.itemIndex ][ e.bindId ].data;
317 | data && args.onClick(data);
318 | }
319 | }
320 |
321 | function toggleAI(visible) {
322 | if ($.gallery == null) { return; }
323 |
324 | var footerView = $.gallery.footerView;
325 | if (visible) {
326 | footerView.show();
327 | } else {
328 | footerView.hide();
329 | }
330 | };
331 | exports.toggleAI = toggleAI;
332 |
333 | function twirl() {
334 | var duration = 2500,
335 | view = $.gallery.footerView.children[0];
336 |
337 | if (OS_ANDROID) {
338 | var spin1 = Ti.UI.createAnimation({
339 | duration: duration,
340 | transform: Ti.UI.create2DMatrix().rotate(0, 360)
341 | });
342 |
343 | view.animate(spin1, twirl);
344 | } else {
345 | var localDuration = duration / 3;
346 |
347 | var spin1 = Ti.UI.createAnimation({
348 | duration: localDuration,
349 | transform: Ti.UI.create2DMatrix().rotate(120)
350 | });
351 |
352 | var spin2 = Ti.UI.createAnimation({
353 | duration: localDuration,
354 | transform: Ti.UI.create2DMatrix().rotate(240)
355 | });
356 |
357 | var spin3 = Ti.UI.createAnimation({
358 | duration: localDuration,
359 | transform: Ti.UI.create2DMatrix().rotate(0)
360 | });
361 |
362 | animation.chainAnimate(view, [spin1, spin2, spin3], twirl);
363 | }
364 | }
--------------------------------------------------------------------------------
/com.imobicloud.gallery/styles/.svn/all-wcprops:
--------------------------------------------------------------------------------
1 | K 25
2 | svn:wc:ra_dav:version-url
3 | V 81
4 | /osc/!svn/ver/8471/trunk/anahita-mobile/app/widgets/com.imobicloud.gallery/styles
5 | END
6 | widget.tss
7 | K 25
8 | svn:wc:ra_dav:version-url
9 | V 92
10 | /osc/!svn/ver/8471/trunk/anahita-mobile/app/widgets/com.imobicloud.gallery/styles/widget.tss
11 | END
12 |
--------------------------------------------------------------------------------
/com.imobicloud.gallery/styles/.svn/entries:
--------------------------------------------------------------------------------
1 | 10
2 |
3 | dir
4 | 8471
5 | https://3dots.svn.beanstalkapp.com/osc/trunk/anahita-mobile/app/widgets/com.imobicloud.gallery/styles
6 | https://3dots.svn.beanstalkapp.com/osc
7 |
8 |
9 |
10 | 2014-05-06T03:47:00.601607Z
11 | 8471
12 | ptquang86
13 |
14 |
15 | svn:special svn:externals svn:needs-lock
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | 1c8f0157-d3c3-41f5-a9ee-378bf7eef68d
28 |
29 | widget.tss
30 | file
31 |
32 |
33 |
34 |
35 | 2014-05-05T08:29:00.000000Z
36 | db9f22e40d16cf27fe684477feccbacb
37 | 2014-05-06T03:47:00.601607Z
38 | 8471
39 | ptquang86
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | 60
62 |
63 |
--------------------------------------------------------------------------------
/com.imobicloud.gallery/styles/.svn/text-base/widget.tss.svn-base:
--------------------------------------------------------------------------------
1 | "#gallery": { scrollType: 'vertical', contentWidth: '100%' }
--------------------------------------------------------------------------------
/com.imobicloud.gallery/styles/widget.tss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imobicloud/ui/c9c6e5d270d63101393a71099e2089d24f27bfc0/com.imobicloud.gallery/styles/widget.tss
--------------------------------------------------------------------------------
/com.imobicloud.gallery/views/.svn/all-wcprops:
--------------------------------------------------------------------------------
1 | K 25
2 | svn:wc:ra_dav:version-url
3 | V 80
4 | /osc/!svn/ver/8471/trunk/anahita-mobile/app/widgets/com.imobicloud.gallery/views
5 | END
6 | widget.xml
7 | K 25
8 | svn:wc:ra_dav:version-url
9 | V 91
10 | /osc/!svn/ver/8481/trunk/anahita-mobile/app/widgets/com.imobicloud.gallery/views/widget.xml
11 | END
12 |
--------------------------------------------------------------------------------
/com.imobicloud.gallery/views/.svn/entries:
--------------------------------------------------------------------------------
1 | 10
2 |
3 | dir
4 | 8471
5 | https://3dots.svn.beanstalkapp.com/osc/trunk/anahita-mobile/app/widgets/com.imobicloud.gallery/views
6 | https://3dots.svn.beanstalkapp.com/osc
7 |
8 |
9 |
10 | 2014-05-06T03:47:00.601607Z
11 | 8471
12 | ptquang86
13 |
14 |
15 | svn:special svn:externals svn:needs-lock
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | 1c8f0157-d3c3-41f5-a9ee-378bf7eef68d
28 |
29 | widget.xml
30 | file
31 | 8481
32 |
33 |
34 |
35 | 2014-05-06T07:37:57.000000Z
36 | fe1d9bf491e4abcf7e1b3ae0a0dfb952
37 | 2014-05-06T07:56:13.675625Z
38 | 8481
39 | ptquang86
40 | has-props
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | 67
62 |
63 |
--------------------------------------------------------------------------------
/com.imobicloud.gallery/views/.svn/prop-base/widget.xml.svn-base:
--------------------------------------------------------------------------------
1 | K 13
2 | svn:mime-type
3 | V 10
4 | text/plain
5 | END
6 |
--------------------------------------------------------------------------------
/com.imobicloud.gallery/views/.svn/text-base/widget.xml.svn-base:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/com.imobicloud.gallery/views/widget.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/com.imobicloud.gallery/widget.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "com.imobicloud.gallery",
3 | "name": "com.imobicloud.gallery",
4 | "description" : "",
5 | "author": "",
6 | "version": "1.0",
7 | "copyright":"Copyright (c) 2012",
8 | "license":"Public Domain",
9 | "min-alloy-version": "1.0",
10 | "min-titanium-version":"2.1",
11 | "tags":"",
12 | "platforms":"android,blackberry,ios,mobileweb,tizen"
13 | }
--------------------------------------------------------------------------------
/com.imobicloud.html/README.md:
--------------------------------------------------------------------------------
1 | # Titanium UI - HTML
2 |
3 | NOTE: FOR NEW UPDATES, VISIT THIS REPOSITORY: https://github.com/imobicloud/com.imobicloud.html
--------------------------------------------------------------------------------
/com.imobicloud.html/assets/webview/html/css/index.css:
--------------------------------------------------------------------------------
1 | * { margin: 0; padding: 0; }
2 | html { font-size: 100%; -webkit-text-size-adjust: 100%; }
3 | html, button, input, select, textarea { font-family: 'ArialMT'; color: #222; }
4 | body { font-size: 13px; line-height: 1.231; background-color: transparent; overflow: hidden; }
5 | a { color: #098ED1; text-decoration: none; }
6 |
7 | img { border: 0; vertical-align: middle; }
8 | .clearfix:before, .clearfix:after { content: " "; display: table; }
9 | .clearfix:after { clear: both; }
10 | .center-h{ margin-left: auto; margin-right: auto; }
11 | .center { display:-webkit-box; -webkit-box-align:center; -webkit-box-pack:center; display:box; box-align:center; box-pack:center; }
12 | .ir { display: block; text-indent: -9999px; }
13 |
14 | #app {
15 | -webkit-tap-highlight-color: rgba(0,0,0,0);
16 | -webkit-touch-callout: none;
17 | -webkit-user-select: none;
18 | -moz-user-select: none;
19 | -ms-user-select: none;
20 | user-select: none;
21 | -webkit-text-size-adjust: none;
22 | -moz-text-size-adjust: none;
23 | -ms-text-size-adjust: none;
24 | -o-text-size-adjust: none;
25 | text-size-adjust: none;
26 | }
27 |
28 | .ai-icon {
29 | display:block; float:left;
30 | width:40px; height:40px;
31 | background:url(../images/pull-icon.png) 0 0 no-repeat;
32 | -webkit-background-size:40px 40px; background-size:40px 40px;
33 | -webkit-transition-property:-webkit-transform;
34 | -webkit-transition-duration:250ms;
35 |
36 | background-position:0 100%;
37 | -webkit-transform:rotate(0deg) translateZ(0);
38 | -webkit-transition-duration:0ms;
39 |
40 | -webkit-animation-name:loading;
41 | -webkit-animation-duration:2s;
42 | -webkit-animation-iteration-count:infinite;
43 | -webkit-animation-timing-function:linear;
44 | }
45 | .mini-ai .ai-icon { width: 32px; height: 32px; background-size: 20px; background-position:center; }
46 |
47 | .ai-label {
48 | line-height: 40px;
49 | }
50 |
51 | @-webkit-keyframes loading {
52 | from { -webkit-transform:rotate(0deg) translateZ(0); }
53 | to { -webkit-transform:rotate(360deg) translateZ(0); }
54 | }
55 |
56 | @media only screen and (min-width : 480px) {
57 | body { font-size: 18px; }
58 | .mini-ai .ai-icon { width: 42px; height: 42px; background-size: 30px; }
59 | }
--------------------------------------------------------------------------------
/com.imobicloud.html/assets/webview/html/css/templates/comment.css:
--------------------------------------------------------------------------------
1 | .comment { border-bottom: 1px solid #d6d6d6; position: relative; min-height: 72px; }
2 | .comment:first-child { margin-top: 16px; }
3 | .author-photo { width: 40px; height: 40px; position: absolute; top: 0; left: 0; }
4 | .author-photo > img { width: 40px; height: 40px; }
5 | .comment-header { margin: 10px 0 3px 56px; }
6 | .author-name { float: left; font-size: 14px; }
7 | .comment-time { float: right; color: #999; font-size: 14px; }
8 | .comment-content { margin: 0 0 10px 56px; color: #000; font-size: 14px; }
9 | .comment-quote { margin: 10px 2px 10px 56px; background-color: #f0f0f0; position: relative; min-height: 62px; box-shadow: 1px 1px 2px 0px rgba(50, 50, 50, 0.5); }
10 | .quote-photo { width: 30px; height: 30px; position: absolute; top: 16px; left: 16px; }
11 | .quote-photo > img { width: 30px; height: 30px; }
12 | .quote-header { padding: 16px 16px 3px 62px; }
13 | .quote-name { font-size: 12px; }
14 | .quote-link { float: right; font-size: 12px; }
15 | .quote-content { padding: 0 16px 10px 62px; font-size: 12px; }
16 |
17 | .comment-table { border: 1px solid gray; border-collapse: collapse; border-spacing: 0; }
18 | .comment-table td { padding: 5px 7px 3px; border: 1px solid gray; }
19 |
20 | .comment-image { height: 300px; }
21 | .quote-content .comment-image { height: 200px; }
22 |
23 |
24 | @media only screen and (min-width : 480px) {
25 |
26 | }
--------------------------------------------------------------------------------
/com.imobicloud.html/assets/webview/html/css/templates/comments.css:
--------------------------------------------------------------------------------
1 | .nav { height: 36px; }
2 | .nav-button { float: left; width: 20%; height: 36px; font-size: 14px; text-align: center; line-height: 36px; }
3 | .nav-first { }
4 | .nav-prev { }
5 | .nav-next { float: right; }
6 | .nav-last { float: right; }
7 | .nav-current { }
8 | #comments { margin: 0 16px; overflow: hidden; }
9 |
10 | @media only screen and (min-width : 480px) {
11 |
12 | }
--------------------------------------------------------------------------------
/com.imobicloud.html/assets/webview/html/images/pull-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imobicloud/ui/c9c6e5d270d63101393a71099e2089d24f27bfc0/com.imobicloud.html/assets/webview/html/images/pull-icon.png
--------------------------------------------------------------------------------
/com.imobicloud.html/assets/webview/html/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | News Feed
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Loading...
19 |
20 |
21 |
22 |
23 |
24 |