Compare commits

..
Author SHA1 Message Date
Spen 64c4a79967 fix new ui announcement init data count 2013-10-29 12:29:05 +08:00
saurabhbhatia fead457616 Updated path for theme 2013-10-29 12:21:55 +08:00
saurabhbhatia b55a9ce535 Added email as argument in the rake task 2013-10-29 11:40:10 +08:00
saurabhbhatia 976c047a7f New Site rake task path 2013-10-29 11:27:08 +08:00
chris 6bc00ce3a3 Use module_app label instead of title 2013-10-29 11:17:02 +08:00
saurabhbhatia 49c1bff005 Updated new_site rake task with upload package 2013-10-29 11:13:47 +08:00
chris 454e36b4ae iFrame ajaxStop 2013-10-29 11:09:20 +08:00
chris 16659d79cd Fix asset:precompile error and delete useless file 2013-10-28 17:04:36 +08:00
chris a14d69211b PagePart widgets for "system widget"
Delete useless code
2013-10-28 16:29:23 +08:00
chris 218cb03641 PagePart widgets except "system widget" 2013-10-28 16:29:23 +08:00
chris 42d0afe65c Page form with front end style 2013-10-28 16:29:23 +08:00
saurabhbhatia 2f41828abd Rake task fix args 2013-10-28 12:17:12 +08:00
saurabhbhatia f396493e44 Updated rake task to accept right attrbites and generate site 2013-10-28 11:54:14 +08:00
chris f3b3c94b42 Item control iframe dom
Css for preview
2013-10-26 18:58:53 +08:00
saurabhbhatia 13da6fc6a1 Added a new rake task with arguments 2013-10-25 21:59:03 +08:00
Spen 254f926093 fix new ui announcement preview 2013-10-24 15:03:20 +08:00
chris 3a3f913ae6 Put back old js 2013-10-23 18:39:46 +08:00
chris 8ebfac2b99 Structure link with json 2013-10-23 18:39:40 +08:00
chris a4d1c68299 Structure page with json 2013-10-23 18:39:35 +08:00
chris 6d5f1a2f12 Fix in js and css for pageslide and ad_banner 2013-10-23 18:39:30 +08:00
chris 94c1d7d5a0 Fix homepage in structure, ajaxStop for structure edit, setForm in pageslide.js 2013-10-23 18:39:21 +08:00
Manson Wang 52fa11a429 Fix filemanager delete url path 2013-10-23 10:42:54 +08:00
saurabhbhatia 0a69bbb653 Updated Favicon display and wording 2013-10-22 10:34:10 +08:00
saurabhbhatia 11ef2a13d6 Updated Site preference with Remove Image functionality for orbit bar 2013-10-21 18:45:49 +08:00
saurabhbhatia cf89ed108a Fixed Site Preferences Language 2013-10-21 17:46:29 +08:00
saurabhbhatia e42cf8720e Updated Site Preferences with language fix 2013-10-21 16:53:11 +08:00
Spen ace582be0c fix new ui survey module authorization 2013-10-21 16:52:32 +08:00
Spen c76adc1896 new ui member account privilege fix 2013-10-21 10:42:50 +08:00
chris f9f2232259 Add setForm and resetForm to pageslide.js
Category, AdBanner and Tag are using js to load the values in the form
2013-10-21 06:34:55 +08:00
chris 8e168b0fe1 Remove erro-cover on close and loadComplete 2013-10-20 21:16:17 +08:00
chris 606ac05563 Pageslide fix for error message and focused element 2013-10-20 20:54:23 +08:00
chris 4403ca3504 Add timeout before running script on window load 2013-10-20 19:13:20 +08:00
chris a9343e9a82 Fix new_ui:save_pages 2013-10-20 19:05:19 +08:00
chris 2530dace02 Change the parser_front_end to be used in the structure for page edit, new_ui:save_pages must be run 2013-10-20 18:44:04 +08:00
chris 1ea8d9faf9 Fix typo for ad_banner 2013-10-20 16:31:34 +08:00
chris 9f5bce9351 Review of the uploaders
Rake task to recreate version: uploader:recreate or uploader:recreate name1 name2 ...
2013-10-20 16:07:20 +08:00
chris cce8f1be9b Add migration task for ad_banner 2013-10-19 20:20:40 +08:00
chris 1d32552b51 Add missing effect to banner 2013-10-19 19:54:37 +08:00
chris 9e74d6d47b Add missing js and css for mobile and fix ad_banner 2013-10-19 19:35:33 +08:00
chris 7353b48212 Finalize ad_banner changes: front-end, back-end, mobile 2013-10-19 19:17:59 +08:00
chris fea86ba3a9 Page slide does not reload from server for ad_banner 2013-10-19 19:17:24 +08:00
chris 92d2af13f2 changes for ad_banner 2013-10-19 19:17:04 +08:00
chris 19bf2f2be5 Modify "can_display" to add "postdate" and "deadline" 2013-10-19 19:14:37 +08:00
chris 68a379f8a4 Some fixes for tags: authorization, translation…
can_use now takes all the open_for into account
2013-10-19 19:14:31 +08:00
chris d2602a3a84 Change code for new page slide.js
Conflicts:
	app/views/admin/pages/_form.html.erb
2013-10-19 19:14:14 +08:00
chris f694134150 Remove useless code
Add data-title
2013-10-19 19:14:07 +08:00
Spen 00e9a5df5b new ui member settings account data
Conflicts:
	app/controllers/admin/users_new_interface_controller.rb
	app/views/admin/users_new_interface/show.html.erb
	config/locales/en.yml
	config/routes.rb
2013-10-18 22:28:27 +08:00
saurabhbhatia 32c1defba0 Updated Site Preferences Templates 2013-10-18 20:03:58 +08:00
Spen 14d2b0cc76 fix new ui member account privilege 2013-10-18 19:52:36 +08:00
saurabhbhatia e453efeb6b Revert "add ntu_ga survey init sorting"
This reverts commit 9076d5496a.
2013-10-18 19:51:16 +08:00
saurabhbhatia 3e491380cd Revert "new ui member settings account data"
This reverts commit e1f4ee464b.
2013-10-18 19:51:02 +08:00
Spen e1f4ee464b new ui member settings account data 2013-10-18 19:12:27 +08:00
Spen 9076d5496a add ntu_ga survey init sorting 2013-10-18 19:10:22 +08:00
saurabhbhatia 14fea3638f Updated with some locale fixes in site preferences 2013-10-18 15:26:41 +08:00
chris 7b1b1fa2d3 Fix bug in open_for, it now takes all the open_for into account
Add open_for_user
2013-10-17 14:20:49 +08:00
Manson Wang a67be030c5 Fix JS Path 2013-10-17 11:21:46 +08:00
chris a76164465e Fix editing a tag module 2013-10-16 23:34:51 +08:00
saurabhbhatia d2459f42c0 Added Favicon and default image for orbitbar 2013-10-16 18:50:22 +08:00
saurabhbhatia 155039ac16 Updated fixes for site info - desktop openess, title always displayed 2013-10-16 18:33:57 +08:00
Manson Wang 2bcecc322e Update Ad_Banner for new jQuery
Removed loading module.js in module_widget.html.erb
2013-10-16 12:28:21 +08:00
Spen fbe6017382 new ui ask module lose 2 file 2013-10-16 10:31:16 +08:00
harrybomrah df5cda7a98 new feature added for not loading submenus inside api for desktop 2013-10-16 09:37:39 +08:00
harrybomrah fbea249782 jquery update and also fixed app manager bug .. jquery updated to 1.10.2 and jquery ui updated to 1.10.0 .. gem jquery-rails vs 2.1.4 changed to 3.0.4 and jquery-ui-rails changed to 4.0.5 2013-10-16 09:37:33 +08:00
chris 279ac774d4 Migrate form old ui to new ui (categories, tags and authorizations) 2013-10-15 23:38:44 +08:00
Manson Wang 11b880752d Fix Ad_Banner backend refresh page after edit banner 2013-10-15 19:50:01 +08:00
Manson Wang 76ba7087b2 Fix Ad_Banner frontend for IE8
Fix backend bug in editing banner
Translation Added
2013-10-15 19:37:12 +08:00
Spen b9fbba2962 fix new ui ask module frontend 2013-10-15 17:01:07 +08:00
saurabhbhatia 96c3be68f7 Fixed Enable and Disable, Sitemap and Terms of Use for header and footer 2013-10-15 10:37:49 +08:00
saurabhbhatia 5fb3731430 Show Custom orbit bar icon only for frontend and desktop 2013-10-15 10:07:46 +08:00
saurabhbhatia fb34dc673f Changeable Orbitbar logo 2013-10-14 18:20:26 +08:00
harrybomrah 14ea611f8c fixed file view on server for desktop 2013-10-14 16:49:54 +08:00
harrybomrah 4f04eca74f test for fileview in desktop on server 2013-10-14 16:49:51 +08:00
saurabhbhatia 4120be6f8e fixes in sitemap, site preference 2013-10-14 16:48:50 +08:00
saurabhbhatia ae66e7257f Added Rackprofile to development assets 2013-10-14 10:55:01 +08:00
saurabhbhatia 55fa1cef4f Added Enable and disable terms of use, sitemap 2013-10-11 13:14:37 +00:00
saurabhbhatia 5c8a57e700 Fixed Sitemap Toggle 2013-10-09 09:06:21 +00:00
saurabhbhatia 7ef2dacf00 Fix links in member module 2013-10-09 05:22:51 +00:00
chris 08a8d668ec Display de page contexts in the mobile version as set in structure 2013-10-08 18:11:29 +08:00
chris b4f5fddc5c Add option to skip authorization 2013-10-08 17:18:58 +08:00
chris 315a24556c Fix parser common to skip not found module_app
Do not show default widget if there's no data
2013-10-08 16:42:20 +08:00
chris cce68beff1 Quick fix for front end reloading 2013-10-08 14:52:24 +08:00
chris cf7f7aa29c Fix tag page slide issues 2013-10-08 12:47:31 +08:00
chris 5328a26440 Fix structure position 2013-10-08 12:33:24 +08:00
chris fe1869199e Fix typo, it wasn't executing the filtering on tags 2013-10-07 19:01:59 +08:00
chris 061225f56c Override mongoid-tree callback condition for default position 2013-10-07 18:23:54 +08:00
saurabhbhatia b3e16ce23b Updated desktop widgets controller 2013-10-07 18:13:55 +08:00
saurabhbhatia fad191aefe Updated Desktop Inheritence class 2013-10-07 17:47:13 +08:00
chris 2f866891b1 Limit rubyzip version 2013-10-07 16:25:47 +08:00
chris 48aa7ed638 Update rake for resetting position
Fix codemirror css
2013-10-07 16:23:07 +08:00
chris 21db2a2cba Drag and drop to reorder users 2013-10-07 15:53:54 +08:00
saurabhbhatia 1194bdd9b4 Updated Sitemap with UI fixes - checkbox tag pending 2013-10-07 15:05:50 +08:00
Manson Wang 831bd722b8 Fix site preference openness problem 2013-10-07 14:37:52 +08:00
saurabhbhatia 940a915125 Updated Sitemap with new UI 2013-10-07 09:43:47 +08:00
Manson Wang 792785f7ba Fix relation for Ad_banner and Ad_image
Update site.rake for New UI
2013-10-04 19:20:04 +08:00
chris 43cf6b70b7 Fix structure reorder position 2013-10-04 15:07:24 +08:00
saurabhbhatia ba8da9b6bb Updated button class in template form 2013-10-04 14:41:48 +08:00
saurabhbhatia ff93670949 Updated template editing 2013-10-04 14:41:31 +08:00
Spen f85354c2b6 fix new ui link and archive frontend and widget index 2013-10-04 11:51:36 +08:00
chris 06c48524fd Fix tag to remove ['0', '1'] from the form 2013-10-02 18:36:08 +08:00
chris 31ef12b3da Fix approval link in side bar 2013-10-02 15:35:42 +08:00
saurabhbhatia 08907aa8c1 Search Engine Preferences complete 2013-10-02 15:23:12 +08:00
saurabhbhatia 31b55a0635 Revert "Updated Orbit js to latest version"
This reverts commit b18e61a6c0.
2013-10-02 12:32:45 +08:00
chris 433c8d5da6 Fix link in category for authorization, fix update of auth users 2013-10-02 12:18:20 +08:00
saurabhbhatia b18e61a6c0 Updated Orbit js to latest version 2013-10-02 12:09:44 +08:00
saurabhbhatia 4fe2e31f0e Updated Global css to fix the line height 2013-10-01 17:51:07 +08:00
saurabhbhatia 31e4fb9f39 Updated sidebar line height 2013-10-01 17:47:58 +08:00
saurabhbhatia 9bdb633157 Updated with UI Changes 2013-10-01 17:39:21 +08:00
harrybomrah caca264b50 isotope fixed for all plugins for list and form. 2013-10-01 15:06:49 +08:00
saurabhbhatia 9a0e9ddc82 Revert "Updated Bulletins controller with announcement approval fix"
This reverts commit a9431ad17e.
2013-10-01 15:03:34 +08:00
saurabhbhatia 9f490c87d2 Fixed issue with member plugin delete label 2013-10-01 10:43:37 +08:00
saurabhbhatia a9431ad17e Updated Bulletins controller with announcement approval fix 2013-10-01 10:03:18 +08:00
saurabhbhatia d9ac24470f Updated Member plugin names to remove spaces and generate correct links 2013-09-30 18:25:18 +08:00
harrybomrah 2f673b20ad disabling changes in desktop, missed out in last one 2013-09-30 17:25:02 +08:00
harrybomrah 0a9fd6a4b5 some needed changes in api for desktop 2013-09-30 16:59:50 +08:00
harrybomrah 74ca99a581 delete and sequencing fixed for survey questions 2013-09-30 16:49:27 +08:00
chris dfec6f7642 Fix for user order 2013-09-27 12:46:19 +08:00
Spen 9186978551 new ui member plugin sort fix and user show avatar fix 2013-09-27 11:04:52 +08:00
chris 622534e5db Fix user order:
- gender color
 - add cancel button for input
2013-09-26 20:18:34 +08:00
harrybomrah 52c896d8c5 some backend code change for sharing personal plugin module content. Added sharing in desktop for all the modules. 2013-09-26 20:11:45 +08:00
Spen 028c689739 Change User.all to User.not_guest_user 2013-09-26 19:46:14 +08:00
chris f81894af90 User ordering
Run the task new_ui:save_users
2013-09-26 19:00:13 +08:00
Manson Wang dc3593c162 zh-tw for new ui 2013-09-26 17:13:17 +08:00
Manson Wang 16c26e3273 Fix path of jquery.cycle.all.latest.js 2013-09-26 16:11:08 +08:00
harrybomrah 5332162646 small add question fix for survey module. 2013-09-26 09:31:52 +08:00
harrybomrah 1d0ea6718f brief added to desktop for all plugins 2013-09-25 18:23:44 +08:00
harrybomrah 04ff345b94 survey edit completed 2013-09-25 17:29:38 +08:00
harrybomrah 58fb2d1c73 external links and link widget fixed for development 2013-09-24 15:37:40 +08:00
Spen a067bcd304 Add Brief intro. for all personal plugins
Add Share Setting for Personal Plugins ( if have old data must be add default value "field: is_hidden => false " )
Apply New UI to Member Plugin Edit Page
Personal Plugin Summary fix
Academic Info. list fix
2013-09-18 18:55:40 +08:00
saurabhbhatia b487740035 Fixed Pagination Errors in member module 2013-09-18 16:11:17 +08:00
harrybomrah 1e3cffee0a add page completed with attributes and reordering 2013-09-17 15:34:34 +08:00
harrybomrah e4a16eab3a commit for survey questions 2013-09-17 15:34:23 +08:00
harrybomrah e45b7e09a0 half survey module form changed to new ui plus one calendar fix 2013-09-16 12:25:58 +08:00
harrybomrah bd3462df7f small change left in last commit. commiting for gallery widget 2013-09-16 11:19:24 +08:00
harrybomrah f5f1822f0a no data file added 2013-09-16 11:19:18 +08:00
harrybomrah d532ded8e4 widget code for gallery rewritten for new_ui 2013-09-16 11:19:11 +08:00
chris 8456a91968 Fix structure edit 2013-09-14 17:26:16 +08:00
chris ba7ac5d954 Fix [app_name]_category_with_title and change announcement init 2013-09-14 11:54:35 +08:00
Spen 9cc1e95cb1 announcement add new widget bulletins_and_links
Conflicts:
	vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_bulletins.html.erb
2013-09-14 11:52:19 +08:00
chris c1cbfddf4b Fix for user and role relationship (from role and sub-role side) 2013-09-13 17:39:01 +08:00
harrybomrah 3595c59810 some unmerged code i pushd 3 months back not update by chris 2013-09-13 15:58:42 +08:00
harrybomrah 789e02e313 ad_banner banner load fixed for test site 2013-09-13 14:23:44 +08:00
Manson Wang bb8bc9a529 Added missing translation for gallery 2013-09-12 10:10:37 +08:00
Manson 6430e60577 Added the missing translations in config/locales/en.yml and zh_tw.yml
Conflicts:
	config/locales/en.yml
	config/locales/zh_tw.yml
2013-09-12 09:30:07 +08:00
chris 17d7912e07 Ray's js code for status in form 2013-09-11 19:24:58 +08:00
chris 911cfdc980 Move js into a file for status in form 2013-09-11 18:38:56 +08:00
harrybomrah 579bc3c245 some very small fix for image alternative text and browse files manager 2013-09-11 14:03:25 +08:00
harrybomrah 8c98645a69 small bug fix for inserting and delete button. 2013-09-11 14:03:19 +08:00
harrybomrah 9e10a3c944 editing for the assets are done with replacable files and description 2013-09-11 14:03:13 +08:00
harrybomrah f920a4f6ba filemanager and some update for file uploader . added file uploader to kernel 2013-09-11 14:03:06 +08:00
chris 3328a41b55 Put back js that was deleted by mistake 2013-09-11 14:01:06 +08:00
chris 06203d27b9 Fix for user and role relationship 2013-09-11 14:00:41 +08:00
saurabhbhatia 865be29b37 Updated Preference Page 2013-09-09 11:29:46 +08:00
saurabhbhatia 0eeb7db1a8 Updated preference UI 2013-09-09 11:02:58 +08:00
saurabhbhatia 7216676c40 Updated Sidebar and Preferences 2013-09-09 10:18:14 +08:00
saurabhbhatia fa857cfeea Default Locale 2013-09-06 18:00:36 +08:00
saurabhbhatia a3f1b8d54a Updated Preferences in Site Info 2013-09-06 18:00:30 +08:00
saurabhbhatia e9d6fa8787 Preference Page 2013-09-06 18:00:28 +08:00
saurabhbhatia 6e032a8757 Add Preference and search engine 2013-09-06 18:00:23 +08:00
saurabhbhatia 1558cfdb4e Updated Sitebar with Search Engine 2013-09-06 18:00:21 +08:00
saurabhbhatia 9e4686a565 Fixed Site Info completely and added search engine page 2013-09-06 18:00:18 +08:00
saurabhbhatia fef7cc4ed2 Updated Site info 2013-09-06 18:00:10 +08:00
saurabhbhatia 7f0821ea84 Updated Site info page to new ui 2013-09-06 17:59:56 +08:00
saurabhbhatia 2c0761aafb Updated Sitemap to New UI 2013-09-06 17:59:54 +08:00
saurabhbhatia 1e5ad750cd Updated Site bar with correct links 2013-09-06 17:59:43 +08:00
harrybomrah 335991e152 by mistake pushed code with debugger 2013-09-05 12:51:15 +08:00
harrybomrah 131dd3fea8 child images tag adding and deleting updated. 2013-09-05 12:51:13 +08:00
chris 6d8698af63 Comment out included css from member front 2013-09-03 17:09:47 +08:00
Matt K. Fu 00ddd94314 fix design index 2013-09-03 15:20:48 +08:00
chris 8045a18230 Change modal delete to take an "remote" option 2013-09-03 15:04:05 +08:00
Spen 81a89d2d7c new ui member image js fix 2013-09-02 14:37:35 +08:00
harrybomrah 4209356e9d new features in gallery image view.. and also tags for gallery completed. 2013-09-02 11:23:01 +08:00
Spen 3123c5de0a new ui member bug and interface fix 2013-09-02 11:22:17 +08:00
harrybomrah 82b6be483a isotope embedded inside desktop kernel 2013-08-30 10:58:08 +08:00
harrybomrah ff64fb5230 file title translations fixed 2013-08-30 10:57:54 +08:00
saurabhbhatia 2bc9d3424a Deleted unused module 2013-08-27 15:10:10 +08:00
saurabhbhatia 5591b06ee6 Ask Module for New UI 2013-08-27 12:38:06 +08:00
saurabhbhatia b970ea1e0e Updated Authorization for member, link, tag, archive 2013-08-27 10:14:39 +08:00
saurabhbhatia 155722519b Module Auth for video 2013-08-23 15:22:21 +08:00
chris 45e987d6f5 Fix for authorization
Dashboard and page authorisation
2013-08-23 12:08:33 +08:00
harrybomrah 399dfad392 faq authorization completed. 2013-08-22 18:00:05 +08:00
saurabhbhatia 53e5c57970 Commented Dashboard Public Visibility and fall back on no-filter defined authorization 2013-08-22 16:43:11 +08:00
saurabhbhatia e75873273c Updated Gallery with authorizations 2013-08-22 16:25:11 +08:00
saurabhbhatia 4c217ec12f Updated Authorizations for Adbanner, Calendar, Location 2013-08-22 15:20:50 +08:00
saurabhbhatia 452da1b8ec Updated Desktop Themes controller 2013-08-22 14:14:19 +08:00
chris ec40591489 Make the filter for authorisation easier for developers 2013-08-22 12:17:50 +08:00
Spen 4078d426a6 new ui personal front_end page(member app) & users_new_interface show sub_roles fix 2013-08-21 14:13:36 +08:00
chris c474fa063f New authorization 2013-08-21 13:42:29 +08:00
chris d24bd176cc Changes in datetimepicker to accepts formats in options 2013-08-21 13:42:29 +08:00
769 changed files with 21571 additions and 11594 deletions

No files matched your search

+6 -3
View File
@@ -11,13 +11,14 @@ gem "net-ldap", "~> 0.3.1"
gem 'devise', '1.5.3'
gem 'exception_notification' # Send error trace
gem 'execjs'
gem 'jquery-rails', '2.1.4'
gem 'jquery-ui-rails'
gem 'jquery-rails', '3.0.4'
gem 'jquery-ui-rails', "4.0.5"
gem "select2-rails", '3.3.1'
gem 'kaminari'
gem 'time_difference'
gem "acts_as_unvlogable"
gem 'youtube_it'
gem 'gotcha'
# gem "memcached", "~> 1.4.3"
# gem "memcache-client"
@@ -38,7 +39,7 @@ gem 'resque-scheduler' # job scheduling
gem 'resque-restriction'
#gem 'rb-readline'
# gem 'ruby-debug19'
gem 'rubyzip'
gem 'rubyzip', '< 1.0.0'
gem 'sunspot_mongo'
gem 'sunspot_solr'
@@ -97,6 +98,8 @@ group :test, :development do
gem "watchr"
gem "spork"
gem "capybara"
#gem 'rack-mini-profiler'
gem "better_errors"
# gem 'yard'
# gem "bluecloth"
end
+1 -1
View File
@@ -5,7 +5,7 @@
// the compiled file.
//
//= require jquery
//= require mobile/jquery.cycle.all
//= require cycle2
//= require mobile/jquery.mu.image.resize
//= require mobile/orbit.mobile
//= require mobile/jquery.mobile-1.2.0.min
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 123 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 127 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 126 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 126 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@@ -0,0 +1,21 @@
$(function() {
$.pageslide.closeCallback(function(pageslide, item) {
$("tr").removeClass("active");
pageslide.find('.preview').cycle('destroy');
});
$.pageslide.loadComplete(function(pageslide, item) {
$("tr").removeClass("active");
item.closest('tr').addClass('active');
if(item.data('id') == 'new') {
resetForm();
pageslide.find('form').attr('action', '/admin/ad_banners/');
pageslide.find('form').attr('method', 'post');
}
else {
setForm(item.data('form'));
pageslide.find('form').attr('action', '/admin/ad_banners/' + item.data('id'));
pageslide.find('form').attr('method', 'put');
}
setSlideshow(pageslide.find('.preview'), item.data());
});
})
@@ -0,0 +1,19 @@
$(function() {
$.pageslide.closeCallback(function(pageslide, item) {
$("tr").removeClass("active");
});
$.pageslide.loadComplete(function(pageslide, item) {
$("tr").removeClass("active");
item.closest('tr').addClass('active');
if(item.data('id') == 'new') {
resetForm();
pageslide.find('form').attr('action', '/admin/module_apps/' + item.data('module') + '/categories/');
pageslide.find('form').attr('method', 'post');
}
else {
setForm(item.data('form'));
pageslide.find('form').attr('action', '/admin/module_apps/' + item.data('module') + '/categories/' + item.data('id'));
pageslide.find('form').attr('method', 'put');
}
});
})
+102
View File
@@ -0,0 +1,102 @@
!function ($) {
$.fn.checkListLength = function (param){
_defaultSettings = {
onlyOne: null,
};
_set = $.extend(_defaultSettings, param);
$this = this;
$li = this.children('li');
$dropzone = $('#dropzone');
if(($li.length - _set.onlyOne) == 0) {
$('#dropzone').fadeIn(300);
} else {
$('#dropzone').fadeOut(300);
};
$('#file-list').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true });
}
}(window.jQuery);
$(function () {
'use strict';
// Initialize the jQuery File Upload widget:
$('#fileupload').fileupload({
maxFileSize: 5000000,
acceptFileTypes: /(\.|\/)(gif|jpe?g|png|pdf|doc|docx|ppt|pptx|xls|xlsx)$/i,
dropZone: $('#dropzone'),
headers:{
'X-CSRF-Token': $('meta[name="csrf-token"]').attr("content")
}
}).bind('fileuploadstop', function (e, data) {
window.location.reload();
});
});
$(document).ready(function(){
var insertBtn = $("#insert_btn"),
deleteBtn = $("#delete_btn"),
url = null;
$("#asset_sort_list").on(clickEvent,"input[type=checkbox]",function(){
if($("#asset_sort_list input[type=checkbox]:checked").length == 1){
url = window.location.protocol + "//" + window.location.host + $("#url_" + $("input[type=checkbox]:checked").val()).val();
insertBtn.show();
}else{
insertBtn.hide();
url = null;
}
if($("#asset_sort_list input[type=checkbox]:checked").length)
deleteBtn.show();
else
deleteBtn.hide();
})
insertBtn.bind(clickEvent,function(){
var alt_text = $("#"+language+"_desc_"+$("input[type=checkbox]:checked").val()).val();
alt_text = (alt_text ? alt_text : "This is an image");
if(url){
window.opener.CKEDITOR.tools.callFunction( funcNum, url, function() {
var element,
dialog = this.getDialog();
if ( dialog.getName() == 'image' ) {
element = dialog.getContentElement( 'info', 'txtAlt' );
if ( element )
element.setValue( alt_text );
}
});
window.close();
}
})
deleteBtn.bind( clickEvent,function(){
var items_to_delete = [],
type = getUrlParam("type");
$("input[type=checkbox]:checked").each(function(){
items_to_delete.push($(this).val());
})
$.post("/admin/assets/delete_files",{"files":items_to_delete,"type":type},function(){
deleteBtn.hide();
})
})
var currentEdit = null;
$(document).on("ajax:success","form[data-remote=true]",function(evt, data, xhr){
currentEdit.replaceWith($(data));
$("#editform").modal("hide");
})
$("#asset_sort_list").on(clickEvent,".editform",function(){
currentEdit = $(this).parent().parent();
$.get($(this).attr("href"),function(data){
$("#editform").html(data).modal("show");
})
return false;
})
function getUrlParam( paramName ) {
var reParam = new RegExp( '(?:[\?&]|&)' + paramName + '=([^&]+)', 'i' ) ;
var match = window.location.search.match(reParam) ;
return ( match && match.length > 1 ) ? match[ 1 ] : null ;
}
var funcNum = getUrlParam( 'CKEditorFuncNum' ),
t = getUrlParam('CKEditor').split("_"),
language = t[t.length-1];
language = (language == "tw" ? "zh_tw" : language);
})
+18 -1
View File
@@ -1 +1,18 @@
//= require admin/tags
//= require lib/tags
$(function() {
$.pageslide.closeCallback(function(pageslide, item) {
$('.filter-item').removeClass("active");
});
$.pageslide.loadComplete(function(pageslide, item) {
$('.filter-item').removeClass("active");
item.closest('li').addClass('active');
if(item.hasClass('btn')) {
addTagsTab();
$('#filter-default-tag').fastLiveFilter('.add-default-tags-list', '.filter-item', '.tag');
$('.tags-groups').cardCheck({
item: '.card',
});
};
});
})
+21 -1
View File
@@ -1 +1,21 @@
//= require lib/tags
//= require lib/tags
$(function() {
$.pageslide.closeCallback(function(pageslide, item) {
$('.filter-item').removeClass("active");
});
$.pageslide.loadComplete(function(pageslide, item) {
$('.filter-item').removeClass("active");
item.closest('li').addClass('active');
if(item.data('id') == 'new') {
resetForm();
pageslide.find('form').attr('action', '/admin/tags/');
pageslide.find('form').attr('method', 'post');
}
else {
setForm(item.data('form'));
pageslide.find('form').attr('action', '/admin/tags/' + item.data('id'));
pageslide.find('form').attr('method', 'put');
}
});
})
+36 -33
View File
@@ -38,7 +38,11 @@ if($.support.touch) {
$checked.each(function() {
if(!$(this).closest('div').hasClass('togglebox')) {
$(this).wrap('<div class="toggle-control"/>');
$(this).wrap('<div class="togglebox" />');
if($(this).attr('type') == "hidden" && $(this).attr('value')) {
$(this).wrap('<div class="togglebox disabled" />');
} else {
$(this).wrap('<div class="togglebox" />');
}
$('<label><b></b></label>').insertAfter($(this));
if($(this).data().deploy) {
switch($(this).data().deploy) {
@@ -252,8 +256,8 @@ if($.support.touch) {
$arrow = $('.sub-nav-arrow'),
$wrap = $('#main-wrap'),
$wrapLeft = $wrap.css('margin-left'),
$position = 0,
$arrowHeightFormat = $('.position').height()-8;
$position = $arrow.outerHeight(true)*-1,
$arrowHeightFormat = $arrow.outerHeight(true)/2;
if($('#sidebar').length>0) {
$wrap.css({'margin-left': 61});
$wrapLeft = 61;
@@ -270,7 +274,7 @@ if($.support.touch) {
}
// Arrow defaults position
$position = $el.eq($elIndex).offset().top-$el.eq($elIndex).height()/2+$arrowHeightFormat-$(document).scrollTop();
$position = $el.eq($elIndex).position().top+$el.eq($elIndex).height()/2-$arrowHeightFormat+$('.scroller').position().top;
$arrow.css({
'top': $position,
});
@@ -281,7 +285,7 @@ if($.support.touch) {
$el.on(mouseenterEvent, function(e) {
$block.siblings().removeClass('show').eq($(this).index()).addClass('show');
$arrow.stop(true, false).animate({
top: ($(this).offset().top-$(this).height()/2)+$arrowHeightFormat-$(document).scrollTop(),
top: ($(this).position().top+$(this).height()/2)-$arrowHeightFormat+$('.scroller').position().top,
},{
duration: 500,
easing: 'easeInOutBack',
@@ -325,7 +329,7 @@ if($.support.touch) {
})
};
// $el.on('mouseleave', function() {
// $el.hasClass('active') ? $position = $el.eq($elIndex).offset().top-$el.eq($elIndex).height()/2+$arrowHeightFormat-$(document).scrollTop() : 0;
// $el.hasClass('active') ? $position = $el.eq($elIndex).position().top+$el.eq($elIndex).height()/2-$arrowHeightFormat+$('.scroller').position().top;
// $(this).hasClass('active') ? '':$(this).children('span').removeClass('hover');
// });
$block.on({
@@ -372,9 +376,9 @@ if($.support.touch) {
if($elIndex === null) {
$position = 0;
$position = $arrow.outerHeight(true)*-1;
} else {
$position = $el.eq($elIndex).offset().top-$el.eq($elIndex).height()/2+$arrowHeightFormat-$(document).scrollTop();
$position = $el.eq($elIndex).position().top+$el.eq($elIndex).height()/2-$arrowHeightFormat+$('.scroller').position().top;
}
$arrow.stop(true, false).animate({
top: $position,
@@ -409,8 +413,8 @@ if($.support.touch) {
});
// Sidebar Nav Drag
if(/MSIE 8.0/g.test($ua)){
$arrow.remove();
$sidebarMenu.addClass('nano')
.css({'position': 'relative', 'top': '0px'})
.children('.scroller')
.addClass('content')
.removeClass('scroller');
@@ -469,9 +473,26 @@ if($.support.touch) {
// }
// }
};
$.fn.delayKeyup = function(callback, ms){
var timer = 0;
$(this).keyup(function(){
clearTimeout (timer);
timer = setTimeout(callback, ms);
});
return $(this);
};
}(window.jQuery);
var ini = function() {
api = this
api.modal = function(e) {
$('#dialog a.delete-item').attr("href", e);
$('#dialog').modal('show');
}
}
var ini = function() {
api = this
api.modal = function(e) {
@@ -483,31 +504,13 @@ var ini = function() {
// Open Slide
function openSlide() {
var $openSlide = $('.open-slide'),
$pageslideW;
$(window).width() > 1440 ? $pageslideW = 1024 : $pageslideW = 954;
$(window).resize(function() {
$(this).width() > 1440 ? $pageslideW = 1024 : $pageslideW = 954;
})
$openSlide.each(function() {
if($(this).hasClass('view-page')) {
$(this).pageslide({ W: $pageslideW, iframe: true });
} else if($('.item-groups').length) {
$(this).pageslide({ W: 324 });
} else {
$(this).pageslide();
};
});
$('.bottomnav .open-slide').on('click', function() {
$('.table tr').removeClass('active');
$('.filter-item').removeClass('active')
});
var $openSlide = $('.open-slide');
typeof customOpenSlide === 'function' ? customOpenSlide($openSlide) : $openSlide.pageslide();
}
function formTip() {
if($('.main-forms').length && $('.add-on').length) {
$('.main-forms .add-on, .main-forms .file-link').tooltip({
if($('.main-forms').length && $('.add-on').length || $('.phtot-action').length) {
$('.main-forms .add-on, .main-forms .file-link, .phtot-action li').tooltip({
position: {
my: "center bottom-4",
at: "center top"
@@ -537,7 +540,7 @@ function changeStatusHidden() {
// Document Ready
$(function() {
new ini();
$('.delete').on('click', function() {
$('#main-wrap').on('click', '.delete', function() {
api.modal($(this).attr('rel'));
})
initialState();
@@ -565,7 +568,7 @@ $(function() {
if($('#sidebar').length) {
if(!/MSIE 8.0/g.test(navigator.userAgent)){
document.getElementById('sidebar').addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
};
}
}
if($('#pageslide').length) {
openSlide();
@@ -26,10 +26,11 @@ CKEDITOR.editorConfig = function( config ) {
// config.filebrowserImageBrowseUrl = '/browser/browse.php?type=Images';
// config.filebrowserUploadUrl = '/uploader/upload.php';
config.filebrowserBrowseUrl = "<%= Rails.application.routes.url_helpers.file_upload_admin_assets_path %>"
config.filebrowserUploadUrl = "<%= Rails.application.routes.url_helpers.file_upload_admin_assets_path %>"
config.filebrowserBrowseUrl = "<%= Rails.application.routes.url_helpers.admin_assets_path %>?module_app_id=<%= ModuleApp.first(conditions: {title: 'Asset'}).id.to_s %>";
config.filebrowserImageBrowseUrl = "<%= Rails.application.routes.url_helpers.admin_assets_path %>?type=images&module_app_id=<%= ModuleApp.first(conditions: {title: 'Asset'}).id.to_s %>";
// config.filebrowserUploadUrl = "<%= Rails.application.routes.url_helpers.file_upload_admin_assets_path %>";
config.contentsCss = '/orbit_4.0.1/assets/javascripts/lib/ckeditor/plugins/stylesheetparser/samples/assets/sample.css';
// config.contentsCss = '/orbit_4.0.1/assets/javascripts/lib/ckeditor/plugins/stylesheetparser/samples/assets/sample.css';
// Load from a list of definitions.
// config.stylesSet = [
+10
View File
@@ -0,0 +1,10 @@
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
(function(a){CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;"undefined"!=typeof a&&(a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a},ckeditor:function(g,d){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g))var k=d,d=g,g=k;var i=[],d=d||{};this.each(function(){var b=
a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,j=new a.Deferred;i.push(j.promise());if(c&&!f)g&&g.apply(c,[this]),j.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),j.resolve()):setTimeout(arguments.callee,100)},0)},null,null,9999);else{if(d.autoUpdateElement||"undefined"==typeof d.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)d.autoUpdateElementJquery=!0;d.autoUpdateElement=!1;b.data("_ckeditorInstanceLock",
!0);c=a(this).is("textarea")?CKEDITOR.replace(h,d):CKEDITOR.inline(h,d);b.data("ckeditorInstance",c);c.on("instanceReady",function(d){var e=d.editor;setTimeout(function(){if(e.element){d.removeListener();e.on("dataReady",function(){b.trigger("dataReady.ckeditor",[e])});e.on("setData",function(a){b.trigger("setData.ckeditor",[e,a.data])});e.on("getData",function(a){b.trigger("getData.ckeditor",[e,a.data])},999);e.on("destroy",function(){b.trigger("destroy.ckeditor",[e])});e.on("save",function(){a(h.form).submit();
return!1},null,null,20);if(e.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){e.updateElement()})};a(h.form).submit(c);a(h.form).bind("form-pre-serialize",c);b.bind("destroy.ckeditor",function(){a(h.form).unbind("submit",c);a(h.form).unbind("form-pre-serialize",c)})}e.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[e]);g&&g.apply(e,[h]);j.resolve()}else setTimeout(arguments.callee,
100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,i).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}}),CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(d){if(arguments.length){var k=this,i=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(d,function(){f.resolve()});i.push(f.promise());
return!0}return g.call(b,d)});if(i.length){var b=new a.Deferred;a.when.apply(this,i).done(function(){b.resolveWith(k)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}})))})(window.jQuery);
+4
View File
@@ -0,0 +1,4 @@
//= require lib/cycle2/jquery.cycle2.min.js
//= require lib/cycle2/transition/jquery.cycle2.flip.min.js
//= require lib/cycle2/transition/jquery.cycle2.scrollVert.min.js
//= require lib/cycle2/transition/jquery.cycle2.tile.min.js
+4 -1
View File
@@ -6,7 +6,7 @@
//
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require jquery.ui.all
//= require desktop/jquery.form
//= require desktop/jquery.tinyscrollbar
//= require desktop/jquery.miniColors.min
@@ -19,3 +19,6 @@
//= require select2
//= require jquery.isotope.min.js
//= require orbit_js_1.0.1-front-end
//= require ckeditor/init
//= require ckeditor/jquery-ckeditor
+99 -52
View File
@@ -20,6 +20,7 @@
//for forms
//form-type = "ajax_form" will turn form to ajax submit
//notification = string will display after the form is succesfully submitted
//response-type = "json"|"script"|"xml|html" default is json
//for layout tinyscrollbar
//content-layout="datalist|column|simple" datalist is for data list from database.. column is usually for forms and some other pages.. simple is without any columns, the page will be displayed as it is.. base width will be considered the default width for tinyscrollbar
@@ -28,6 +29,9 @@
//column="true" this option is only for column layout... the columns will be formed on this column=true attribute and it should be a div
//item=true this attribute should be present in the li tag. li with this attribute are considered as a separate item.
//enableLanguageSelect( dom ) children <a> will be binded with language, data-lang = string ex "en"|"zh_tw" will toggle all data-langunage throughout the page
//enableSharing( dom ) children <a> will be binded with share, data-mode = string ex "public"|"private" will change the mode for all the selected items. the dom with class should have data-link = url data-var = vaiable_name, default will be mode
$.extend($.expr[':'], {
'containsi': function (elem, i, match, array) {
@@ -164,7 +168,7 @@ var orbitDesktop = function(dom){
o.loadIconCache();
var custom_load = window.location.hash;
if(!custom_load){
$(o.contentHolder).empty().load("/desktop/desktop",function(){
$(o.contentHolder).empty().load("/desktop/desktop_container",function(){
o.desktopData["d_desktop"] = "";
o.initializeDesktop("d_desktop","",false);
})
@@ -222,7 +226,8 @@ var orbitDesktop = function(dom){
this.bindDesktopEvents = function(){ //this function will bind the global handlers to thd desktop, for example doc
$(".docklist a").click(function(){
o.menu_item($(this));
if( !$( this ).parent().hasClass( 'disable' ) )
o.menu_item($(this));
return false;
});
@@ -247,16 +252,12 @@ var orbitDesktop = function(dom){
$("body").on("submit","form[form-type=ajax_form]",function(){
var callback_method = $(this).attr("callback-method"),
dt = null,
dt = ($(this).attr("response-type") == null ? "json" : $(this).attr("response-type")),
notification = $(this).attr("notification");
dt = $(this).attr("response-type");
if(dt == null){
dt = "json";
}
var options = {
dataType : dt,
resetForm : true,
success:function(responseText, statusText, xhr, $form){
resetForm : false,
success: function(responseText, statusText, xhr, $form){
if(typeof callback_method != "undefined"){
if(callback_method != ""){
window.o[o.data_method][callback_method](responseText,statusText,xhr,$form);
@@ -265,7 +266,7 @@ var orbitDesktop = function(dom){
if(typeof notification == "string")
o.notify(notification,"success");
},
error:function(){
error: function(){
o.notify("Please try again later!","imp");
}
}
@@ -274,10 +275,11 @@ var orbitDesktop = function(dom){
});
$("body").on("click","*[ajax-remote]",function(){
var $e = $(this);
var t = $e.attr("ajax-remote");
var classes_to_toggle = $e.attr("toggle-onclick");
var exe = $e.attr("callback-method"); // (typeof $e.attr("callback-method") == "function"? $e.attr("callback-method") : "");
var $e = $(this),
t = $e.attr("ajax-remote"),
classes_to_toggle = $e.attr("toggle-onclick"),
responsetype = $e.attr('response-type') ? $e.attr('response-type') : "html",
exe = $e.attr("callback-method"); // (typeof $e.attr("callback-method") == "function"? $e.attr("callback-method") : "");
if(classes_to_toggle){
$e.toggleClass(classes_to_toggle);
}
@@ -289,9 +291,9 @@ var orbitDesktop = function(dom){
}
var ca = $e.attr("content-holder");
var a = function(){
$.ajax({
type : t,
dataType : responsetype,
url : $e.attr("href"),
success : function(data){
if(typeof data == "string"){
@@ -302,6 +304,7 @@ var orbitDesktop = function(dom){
// $("div[container=true]").html(data);
}
}
if(exe)
window.o[o.data_method][exe](data,$e);
if(t == "delete"){
@@ -451,7 +454,7 @@ var orbitDesktop = function(dom){
var ist = function(){
$('#holder').css('height', $('#container').height() - 72);
$('.tinycanvas').css('height', $('#panel_r').height() - 36);
$('.tinycanvas').css('height', $('#holder').height() - 36);
var dom = $("*[isotope=true]").isotope({
layoutMode: 'fitColumns',
onLayout: function($elems, instance){
@@ -602,10 +605,11 @@ var orbitDesktop = function(dom){
this.menu_item = function(dom,customload,submenuitem){
if(!customload)customload=false;
var target = dom.attr("id");
var url = dom.attr("href");
var target = dom.attr("id"),
url = dom.attr("href"),
submenu_pass = ( dom.attr("sub-menu") == "false" ? false : true);
if(!url)return false;
o.data_method = dom.attr("callback-method");
if(o.currenthtml!=target){
if(o.desktopData[o.currentface] == "undefined"){
@@ -626,33 +630,37 @@ var orbitDesktop = function(dom){
window.o[o.data_method](target,url,cache);
}
}
try {
if(!customload){
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"),data);
} else {
if(submenuitem){
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[custom-load="+submenuitem+"]"));
} else {
if( submenu_pass ){
try {
if(!customload){
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"),data);
} else {
if(submenuitem){
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[custom-load="+submenuitem+"]"));
} else {
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"),data);
}
}
}
} catch(EX){}
} catch(EX){}
}
header_ani();
});
}else{
$(o.contentHolder).html(o.desktopData[o.currentface]);
try{
if(!customload){
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"),o.desktopData[o.currentface]);
}else{
if(submenuitem)
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[custom-load="+submenuitem+"]"),o.desktopData[o.currentface]);
else
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"),o.desktopData[o.currentface]);
}
}catch(EX){}
if( submenu_pass ){
try{
if(!customload){
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"),o.desktopData[o.currentface]);
}else{
if(submenuitem)
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[custom-load="+submenuitem+"]"),o.desktopData[o.currentface]);
else
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"),o.desktopData[o.currentface]);
}
}catch(EX){}
}
cache = (o.lastlink == "/desktop/app_manager" ? false : true);
// cache = (o.lastlink == "/desktop/app_manager" ? false : true);
if(typeof o.data_method != "undefined"){
if(o.data_method != ""){
window.o[o.data_method](target,url,cache);
@@ -698,6 +706,15 @@ var orbitDesktop = function(dom){
}
})
o.highlight_sub_menu_item(dom);
} else {
o.lastlink = dom.attr("href");
$.ajax({
url : dom.attr("href"),
type : "get",
success : function(data){
o.layout_data(data);
}
})
}
if(dom.length == 0)
o.layout_data(data);
@@ -1083,7 +1100,7 @@ var orbitDesktop = function(dom){
data : options,
success : function(data){
if(data.success == "true"){
if(dom.is(":checked")){ console.log("true");
if(dom.is(":checked")){
elementSettingsData[$e.data("id")].sections.push({"id" : dom.data("section"),"name":sectionDetails.name});
o.notify("Added to " + sectionDetails.name,"success");
}else{
@@ -1107,20 +1124,16 @@ var orbitDesktop = function(dom){
var info_open = function(){
if($appinfo.is(":hidden")){
$('.overview').stop().animate({'width': '+=480'},0 , function(){
$('.tinycanvas').tinyscrollbar_update();
// $('.tinycanvas').tinyscrollbar_update('relative');
});
$appinfo
.css({
'display': 'block',
'margin-left': -480
})
.delay(300)
}).fadeIn(200)
.animate({
'margin-left': 0
}, 500, 'easeInOutQuint');
} else {
$('.tinycanvas').tinyscrollbar_update();
}
}
}
var info_close = function(){
@@ -1131,13 +1144,11 @@ var orbitDesktop = function(dom){
'margin-left': -480
},500 , 'easeInOutQuint', function(){
$('.overview').animate({'width': '-=480'}, 0, function(){
$('.tinycanvas').tinyscrollbar_update();
// $('.tinycanvas').tinyscrollbar_update();
});
$(this).attr("style","");
$(this).fadeOut(300).attr("style","");
});
} else {
$('.tinycanvas').tinyscrollbar_update();
}
}
}
$(window).on('keydown', function(){
if($('#searchbox').val() == 'Search'){
@@ -1868,6 +1879,42 @@ var orbitDesktop = function(dom){
}
}
}
this.enablelanguageSelect = function(){
$(".language_select a").click(function(event) {
$("*[data-language]").hide();
$("*[data-language="+$(this).data("lang")+"]").show();
return false;
});
}
this.enableSharing = function( dom ){
var el = $( dom ),
variable = ( el.data( 'var' ) ? el.data( "var" ) : "mode"),
_url = el.data( 'link' ) + "?" + variable + "=",
classes = [];
el.find( "a" ).each( function(){
classes.push( $( this ).attr( "item-class" ) ? $( this ).attr( "item-class" ) : $( this ).data( 'mode' ) );
})
el.find( "a" ).click( function(){
var ids = [],
mode = $( this ).data( 'mode' ),
inject_class = $( this ).attr( 'item-class' ) ? $( this ).attr( 'item-class' ) : mode;
$( ".overview li[item=true] a.icon-check" ).each( function(){
ids.push( $( this ).data( 'id' ) );
$( "li[data-id="+ $( this ).data( 'id' ) +"]").removeClass( classes.join( " " ) ).addClass( inject_class );
})
$.ajax({
url : _url + mode,
data : {"ids" : ids},
datatype : "json",
})
return false;
})
}
this.minimizeBarManager = function(){
var minimizedApps = [],
minimizeBar = $("#minimizebar");
+18 -21
View File
@@ -1,33 +1,30 @@
var banners = [];
var banner_index = 0;
$(document).ready(function() {
$.each($(".dymanic_load"),function(){
if($(this).attr("path")==''){$(this).html("App setting Failed");}
if($(this).attr("path")!=''){
ajax_load_proc($(this),$(this).attr("path"));
}
}
);
$("#main_content").addClass("module");
if($(this).attr("path")==''){
$(this).html("App setting Failed");
}else{
ajax_load_proc($(this),$(this).attr("path"));
}
});
function ajax_load_proc(wapper,url){
$("#main_content").addClass("module");
});
function ajax_load_proc(wapper,url,isBanner){
$.get(encodeURI(url), {}, function(respText,textSta,XML){
if (textSta == 'success') {
wapper.html(respText);
};
if(textSta == 'error')
wapper.html("Loading Failed<br/> <a href='"+$(this).attr('path')+"'>Go See</a>");
if (textSta == 'success') {
wapper.html(respText);
};
if(textSta == 'error')
wapper.html("Loading Failed<br/> <a href='"+$(this).attr('path')+"'>Go See</a>");
});
}
// Ad Banner FX code [start]
function getTimeout() {
return $(this).attr('time_to_next');
}
$(document).ready(function() {
$(document).on('click', '.slideshow img', function()
$(document).on('click', '.orbit-cycle-slideshow img', function()
{
if($(this).attr('link_url')!='')
{
@@ -1,79 +1,81 @@
$(function() {
var bannerEffect,
bannerTime,
bannerSpeed,
bannerW,
bannerH;
$(".ad_banner_ad_fx").change(function () {
bannerTime = $("#pageslide #timeout").val()*1000;
bannerSpeed = $("#pageslide #speed").val()*1000;
bannerTime = parseInt(bannerTime) || 300;
bannerSpeed = parseInt(bannerSpeed) || 300;
slideshow($(this).val(), bannerTime, bannerSpeed);
function slideshow (element, bannerEffect, bannerTime, bannerSpeed) {
element.cycle('destroy');
element.children('img').removeAttr('class');;
element.cycle({
fx: bannerEffect,
timeout: bannerTime,
speed: bannerSpeed,
});
slideshow = function (bannerEffect, bannerTime, bannerSpeed) {
var $preview = $('#pageslide .preview'),
$previewImg = $('#pageslide .preview img');
$preview.cycle('destroy');
$previewImg.removeAttr('style');
$preview.cycle({
fx: bannerEffect,
timeout: bannerTime,
speed: bannerSpeed,
});
}
$('.open-slide').on('click', function() {
var $preview = $('#pageslide .preview'),
$data = $(this).data(),
effect = $data.fx,
time = $data.time,
speed = $data.speed,
W = $data.w,
H = $data.h;
$("#pageslide #timeout").attr("value", time/1000);
$("#pageslide #speed").attr("value", speed/1000);
$("#pageslide #banner_width").attr("value", W);
$("#pageslide #banner_height").attr("value", H);
$("#pageslide #ad_banner_ad_fx option").each(function(i) {
if($(this).attr("value") == effect) {
this.selected = true;
}
});
slideshow(effect, time, speed)
})
};
function setSlideshow(element, data) {
$("#pageslide .ad_banner_ad_fx").children('option:selected').each(function(index, el) {
$(this).val() == 'flipHorz' || $(this).val() == 'flipVert' ? $('.suckIE').show() : $('.suckIE').hide();
});
slideshow(element, data['fx'], 2000, 1000);
}
function preview() {
$('.open-modal').on('click', function() {
var $data = $(this).data()
bannerEffect = $data.fx;
bannerTime = $data.time;
bannerSpeed = $data.speed;
bannerW = $data.w;
bannerH = $data.h;
var _data = $(this).data();
bannerName = _data.name;
bannerEffect = _data.fx;
bannerTime = _data.time;
bannerSpeed = _data.speed;
bannerW = _data.w;
bannerH = _data.h;
$('#preview').modal('show');
});
$('#preview').on('shown', function() {
$(this).attr('aria-labelledby', bannerName.toString()).find('h3').text(bannerName.toString())
if(bannerW > 500) {
var resize = 500/bannerW
bannerW = Math.floor(bannerW*resize);
bannerH = Math.floor(bannerH*resize);
console.log(bannerW)
};
if(bannerH > 300) {
var resize = 300/bannerH
bannerW = Math.floor(bannerW*resize);
bannerH = Math.floor(bannerH*resize);
}
$(this).find('.preview').cycle({
fx: bannerEffect,
timeout: bannerTime,
speed: bannerSpeed,
fit: 1,
width: bannerW,
height: bannerH,
slideshow($(this).find('.preview'), bannerEffect, bannerTime, bannerSpeed);
$(this).find('.preview').css({
'width': bannerW,
'height': bannerH
});
$(this).find('.preview img').css({
'width': '100%',
'height': '100%'
});
});
$('#preview').on('hidden', function() {
$(this).attr('aria-labelledby', '').find('h3').text('')
$(this).find('.preview').cycle('destroy');
$(this).find('.preview img').removeAttr('style');
});
});
};
$(function() {
var bannerName = null,
bannerEffect = null,
bannerTime = null,
bannerSpeed = null,
bannerW = null,
bannerH = null,
$preview = $('#pageslide .preview');
$(".ad_banner_ad_fx").change(function () {
var suckIE = false;
// bannerTime = $("#pageslide #timeout").val()*1000;
// bannerSpeed = $("#pageslide #speed").val()*1000;
bannerTime = parseInt(bannerTime) || 300;
bannerSpeed = parseInt(bannerSpeed) || 300;
$(this).children('option:selected').each(function(index, el) {
$(this).val() == 'flipHorz' || $(this).val() == 'flipVert' ? $('.suckIE').show() : $('.suckIE').hide();
});
slideshow($preview, $(this).val(), 2000, 1000);
});
preview();
});
+17
View File
@@ -0,0 +1,17 @@
/*!
* jQuery Cycle2; build: v20131005
* http://jquery.malsup.com/cycle2/
* Copyright (c) 2013 M. Alsup; Dual licensed: MIT/GPL
*/
/*! core engine; version: 20131003 */
(function(e){"use strict";function t(e){return(e||"").toLowerCase()}var i="20131003";e.fn.cycle=function(i){var n;return 0!==this.length||e.isReady?this.each(function(){var n,s,o,c,r=e(this),l=e.fn.cycle.log;if(!r.data("cycle.opts")){(r.data("cycle-log")===!1||i&&i.log===!1||s&&s.log===!1)&&(l=e.noop),l("--c2 init--"),n=r.data();for(var a in n)n.hasOwnProperty(a)&&/^cycle[A-Z]+/.test(a)&&(c=n[a],o=a.match(/^cycle(.*)/)[1].replace(/^[A-Z]/,t),l(o+":",c,"("+typeof c+")"),n[o]=c);s=e.extend({},e.fn.cycle.defaults,n,i||{}),s.timeoutId=0,s.paused=s.paused||!1,s.container=r,s._maxZ=s.maxZ,s.API=e.extend({_container:r},e.fn.cycle.API),s.API.log=l,s.API.trigger=function(e,t){return s.container.trigger(e,t),s.API},r.data("cycle.opts",s),r.data("cycle.API",s.API),s.API.trigger("cycle-bootstrap",[s,s.API]),s.API.addInitialSlides(),s.API.preInitSlideshow(),s.slides.length&&s.API.initSlideshow()}}):(n={s:this.selector,c:this.context},e.fn.cycle.log("requeuing slideshow (dom not ready)"),e(function(){e(n.s,n.c).cycle(i)}),this)},e.fn.cycle.API={opts:function(){return this._container.data("cycle.opts")},addInitialSlides:function(){var t=this.opts(),i=t.slides;t.slideCount=0,t.slides=e(),i=i.jquery?i:t.container.find(i),t.random&&i.sort(function(){return Math.random()-.5}),t.API.add(i)},preInitSlideshow:function(){var t=this.opts();t.API.trigger("cycle-pre-initialize",[t]);var i=e.fn.cycle.transitions[t.fx];i&&e.isFunction(i.preInit)&&i.preInit(t),t._preInitialized=!0},postInitSlideshow:function(){var t=this.opts();t.API.trigger("cycle-post-initialize",[t]);var i=e.fn.cycle.transitions[t.fx];i&&e.isFunction(i.postInit)&&i.postInit(t)},initSlideshow:function(){var t,i=this.opts(),n=i.container;i.API.calcFirstSlide(),"static"==i.container.css("position")&&i.container.css("position","relative"),e(i.slides[i.currSlide]).css("opacity",1).show(),i.API.stackSlides(i.slides[i.currSlide],i.slides[i.nextSlide],!i.reverse),i.pauseOnHover&&(i.pauseOnHover!==!0&&(n=e(i.pauseOnHover)),n.hover(function(){i.API.pause(!0)},function(){i.API.resume(!0)})),i.timeout&&(t=i.API.getSlideOpts(i.currSlide),i.API.queueTransition(t,t.timeout+i.delay)),i._initialized=!0,i.API.updateView(!0),i.API.trigger("cycle-initialized",[i]),i.API.postInitSlideshow()},pause:function(t){var i=this.opts(),n=i.API.getSlideOpts(),s=i.hoverPaused||i.paused;t?i.hoverPaused=!0:i.paused=!0,s||(i.container.addClass("cycle-paused"),i.API.trigger("cycle-paused",[i]).log("cycle-paused"),n.timeout&&(clearTimeout(i.timeoutId),i.timeoutId=0,i._remainingTimeout-=e.now()-i._lastQueue,(0>i._remainingTimeout||isNaN(i._remainingTimeout))&&(i._remainingTimeout=void 0)))},resume:function(e){var t=this.opts(),i=!t.hoverPaused&&!t.paused;e?t.hoverPaused=!1:t.paused=!1,i||(t.container.removeClass("cycle-paused"),0===t.slides.filter(":animated").length&&t.API.queueTransition(t.API.getSlideOpts(),t._remainingTimeout),t.API.trigger("cycle-resumed",[t,t._remainingTimeout]).log("cycle-resumed"))},add:function(t,i){var n,s=this.opts(),o=s.slideCount,c=!1;"string"==e.type(t)&&(t=e.trim(t)),e(t).each(function(){var t,n=e(this);i?s.container.prepend(n):s.container.append(n),s.slideCount++,t=s.API.buildSlideOpts(n),s.slides=i?e(n).add(s.slides):s.slides.add(n),s.API.initSlide(t,n,--s._maxZ),n.data("cycle.opts",t),s.API.trigger("cycle-slide-added",[s,t,n])}),s.API.updateView(!0),c=s._preInitialized&&2>o&&s.slideCount>=1,c&&(s._initialized?s.timeout&&(n=s.slides.length,s.nextSlide=s.reverse?n-1:1,s.timeoutId||s.API.queueTransition(s)):s.API.initSlideshow())},calcFirstSlide:function(){var e,t=this.opts();e=parseInt(t.startingSlide||0,10),(e>=t.slides.length||0>e)&&(e=0),t.currSlide=e,t.reverse?(t.nextSlide=e-1,0>t.nextSlide&&(t.nextSlide=t.slides.length-1)):(t.nextSlide=e+1,t.nextSlide==t.slides.length&&(t.nextSlide=0))},calcNextSlide:function(){var e,t=this.opts();t.reverse?(e=0>t.nextSlide-1,t.nextSlide=e?t.slideCount-1:t.nextSlide-1,t.currSlide=e?0:t.nextSlide+1):(e=t.nextSlide+1==t.slides.length,t.nextSlide=e?0:t.nextSlide+1,t.currSlide=e?t.slides.length-1:t.nextSlide-1)},calcTx:function(t,i){var n,s=t;return i&&s.manualFx&&(n=e.fn.cycle.transitions[s.manualFx]),n||(n=e.fn.cycle.transitions[s.fx]),n||(n=e.fn.cycle.transitions.fade,s.API.log('Transition "'+s.fx+'" not found. Using fade.')),n},prepareTx:function(e,t){var i,n,s,o,c,r=this.opts();return 2>r.slideCount?(r.timeoutId=0,void 0):(!e||r.busy&&!r.manualTrump||(r.API.stopTransition(),r.busy=!1,clearTimeout(r.timeoutId),r.timeoutId=0),r.busy||(0!==r.timeoutId||e)&&(n=r.slides[r.currSlide],s=r.slides[r.nextSlide],o=r.API.getSlideOpts(r.nextSlide),c=r.API.calcTx(o,e),r._tx=c,e&&void 0!==o.manualSpeed&&(o.speed=o.manualSpeed),r.nextSlide!=r.currSlide&&(e||!r.paused&&!r.hoverPaused&&r.timeout)?(r.API.trigger("cycle-before",[o,n,s,t]),c.before&&c.before(o,n,s,t),i=function(){r.busy=!1,r.container.data("cycle.opts")&&(c.after&&c.after(o,n,s,t),r.API.trigger("cycle-after",[o,n,s,t]),r.API.queueTransition(o),r.API.updateView(!0))},r.busy=!0,c.transLine truncated
function(e){"use strict";function t(t,n){var s,o,c,r=n.autoHeight;if("container"==r)o=e(n.slides[n.currSlide]).outerHeight(),n.container.height(o);else if(n._autoHeightRatio)n.container.height(n.container.width()/n._autoHeightRatio);else if("calc"===r||"number"==e.type(r)&&r>=0){if(c="calc"===r?i(t,n):r>=n.slides.length?0:r,c==n._sentinelIndex)return;n._sentinelIndex=c,n._sentinel&&n._sentinel.remove(),s=e(n.slides[c].cloneNode(!0)),s.removeAttr("id name rel").find("[id],[name],[rel]").removeAttr("id name rel"),s.css({position:"static",visibility:"hidden",display:"block"}).prependTo(n.container).addClass("cycle-sentinel cycle-slide").removeClass("cycle-slide-active"),s.find("*").css("visibility","hidden"),n._sentinel=s}}function i(t,i){var n=0,s=-1;return i.slides.each(function(t){var i=e(this).height();i>s&&(s=i,n=t)}),n}function n(t,i,n,s){var o=e(s).outerHeight(),c=i.sync?i.speed/2:i.speed;i.container.animate({height:o},c)}function s(i,o){o._autoHeightOnResize&&(e(window).off("resize orientationchange",o._autoHeightOnResize),o._autoHeightOnResize=null),o.container.off("cycle-slide-added cycle-slide-removed",t),o.container.off("cycle-destroyed",s),o.container.off("cycle-before",n),o._sentinel&&(o._sentinel.remove(),o._sentinel=null)}e.extend(e.fn.cycle.defaults,{autoHeight:0}),e(document).on("cycle-initialized",function(i,o){function c(){t(i,o)}var r,l=o.autoHeight,a=e.type(l),d=null;("string"===a||"number"===a)&&(o.container.on("cycle-slide-added cycle-slide-removed",t),o.container.on("cycle-destroyed",s),"container"==l?o.container.on("cycle-before",n):"string"===a&&/\d+\:\d+/.test(l)&&(r=l.match(/(\d+)\:(\d+)/),r=r[1]/r[2],o._autoHeightRatio=r),"number"!==a&&(o._autoHeightOnResize=function(){clearTimeout(d),d=setTimeout(c,50)},e(window).on("resize orientationchange",o._autoHeightOnResize)),setTimeout(c,30))})}(jQuery),/*! caption plugin for Cycle2; version: 20130306 */
function(e){"use strict";e.extend(e.fn.cycle.defaults,{caption:"> .cycle-caption",captionTemplate:"{{slideNum}} / {{slideCount}}",overlay:"> .cycle-overlay",overlayTemplate:"<div>{{title}}</div><div>{{desc}}</div>",captionModule:"caption"}),e(document).on("cycle-update-view",function(t,i,n,s){"caption"===i.captionModule&&e.each(["caption","overlay"],function(){var e=this,t=n[e+"Template"],o=i.API.getComponent(e);o.length&&t?(o.html(i.API.tmpl(t,n,i,s)),o.show()):o.hide()})}),e(document).on("cycle-destroyed",function(t,i){var n;e.each(["caption","overlay"],function(){var e=this,t=i[e+"Template"];i[e]&&t&&(n=i.API.getComponent("caption"),n.empty())})})}(jQuery),/*! command plugin for Cycle2; version: 20130707 */
function(e){"use strict";var t=e.fn.cycle;e.fn.cycle=function(i){var n,s,o,c=e.makeArray(arguments);return"number"==e.type(i)?this.cycle("goto",i):"string"==e.type(i)?this.each(function(){var r;return n=i,o=e(this).data("cycle.opts"),void 0===o?(t.log('slideshow must be initialized before sending commands; "'+n+'" ignored'),void 0):(n="goto"==n?"jump":n,s=o.API[n],e.isFunction(s)?(r=e.makeArray(c),r.shift(),s.apply(o.API,r)):(t.log("unknown command: ",n),void 0))}):t.apply(this,arguments)},e.extend(e.fn.cycle,t),e.extend(t.API,{next:function(){var e=this.opts();if(!e.busy||e.manualTrump){var t=e.reverse?-1:1;e.allowWrap===!1&&e.currSlide+t>=e.slideCount||(e.API.advanceSlide(t),e.API.trigger("cycle-next",[e]).log("cycle-next"))}},prev:function(){var e=this.opts();if(!e.busy||e.manualTrump){var t=e.reverse?1:-1;e.allowWrap===!1&&0>e.currSlide+t||(e.API.advanceSlide(t),e.API.trigger("cycle-prev",[e]).log("cycle-prev"))}},destroy:function(){this.stop();var t=this.opts(),i=e.isFunction(e._data)?e._data:e.noop;clearTimeout(t.timeoutId),t.timeoutId=0,t.API.stop(),t.API.trigger("cycle-destroyed",[t]).log("cycle-destroyed"),t.container.removeData(),i(t.container[0],"parsedAttrs",!1),t.retainStylesOnDestroy||(t.container.removeAttr("style"),t.slides.removeAttr("style"),t.slides.removeClass(t.slideActiveClass)),t.slides.each(function(){e(this).removeData(),i(this,"parsedAttrs",!1)})},jump:function(e){var t,i=this.opts();if(!i.busy||i.manualTrump){var n=parseInt(e,10);if(isNaN(n)||0>n||n>=i.slides.length)return i.API.log("goto: invalid slide index: "+n),void 0;if(n==i.currSlide)return i.API.log("goto: skipping, already on slide",n),void 0;i.nextSlide=n,clearTimeout(i.timeoutId),i.timeoutId=0,i.API.log("goto: ",n," (zero-index)"),t=i.currSlide<i.nextSlide,i.API.prepareTx(!0,t)}},stop:function(){var t=this.opts(),i=t.container;clearTimeout(t.timeoutId),t.timeoutId=0,t.API.stopTransition(),t.pauseOnHover&&(t.pauseOnHover!==!0&&(i=e(t.pauseOnHover)),i.off("mouseenter mouseleave")),t.API.trigger("cycle-stopped",[t]).log("cycle-stopped")},reinit:function(){var e=this.opts();e.API.destroy(),e.container.cycle()},remove:function(t){for(var i,n,s=this.opts(),o=[],c=1,r=0;s.slides.length>r;r++)i=s.slides[r],r==t?n=i:(o.push(i),e(i).data("cycle.opts").slideNum=c,c++);n&&(s.slides=e(o),s.slideCount--,e(n).remove(),t==s.currSlide?s.API.advanceSlide(1):s.currSlide>t?s.currSlide--:s.currSlide++,s.API.trigger("cycle-slide-removed",[s,t,n]).log("cycle-slide-removed"),s.API.updateView())}}),e(document).on("click.cycle","[data-cycle-cmd]",function(t){t.preventDefault();var i=e(this),n=i.data("cycle-cmd"),s=i.data("cycle-context")||".cycle-slideshow";e(s).cycle(n,i.data("cycle-arg"))})}(jQuery),/*! hash plugin for Cycle2; version: 20130905 */
function(e){"use strict";function t(t,i){var n;return t._hashFence?(t._hashFence=!1,void 0):(n=window.location.hash.substring(1),t.slides.each(function(s){if(e(this).data("cycle-hash")==n){if(i===!0)t.startingSlide=s;else{var o=s>t.currSlide;t.nextSlide=s,t.API.prepareTx(!0,o)}return!1}}),void 0)}e(document).on("cycle-pre-initialize",function(i,n){t(n,!0),n._onHashChange=function(){t(n,!1)},e(window).on("hashchange",n._onHashChange)}),e(document).on("cycle-update-view",function(e,t,i){i.hash&&"#"+i.hash!=window.location.hash&&(t._hashFence=!0,window.location.hash=i.hash)}),e(document).on("cycle-destroyed",function(t,i){i._onHashChange&&e(window).off("hashchange",i._onHashChange)})}(jQuery),/*! loader plugin for Cycle2; version: 20130307 */
function(e){"use strict";e.extend(e.fn.cycle.defaults,{loader:!1}),e(document).on("cycle-bootstrap",function(t,i){function n(t,n){function o(t){var o;"wait"==i.loader?(r.push(t),0===a&&(r.sort(c),s.apply(i.API,[r,n]),i.container.removeClass("cycle-loading"))):(o=e(i.slides[i.currSlide]),s.apply(i.API,[t,n]),o.show(),i.container.removeClass("cycle-loading"))}function c(e,t){return e.data("index")-t.data("index")}var r=[];if("string"==e.type(t))t=e.trim(t);else if("array"===e.type(t))for(var l=0;t.length>l;l++)t[l]=e(t[l])[0];t=e(t);var a=t.length;a&&(t.hide().appendTo("body").each(function(t){function c(){0===--l&&(--a,o(d))}var l=0,d=e(this),u=d.is("img")?d:d.find("img");return d.data("index",t),u=u.filter(":not(.cycle-loader-ignore)").filter(':not([src=""])'),u.length?(l=u.length,u.each(function(){this.complete?c():e(this).load(function(){c()}).error(function(){0===--l&&(i.API.log("slide skipped; img not loaded:",this.src),0===--a&&"wait"==i.loader&&s.apply(i.API,[r,n]))})}),void 0):(--a,r.push(d),void 0)}),a&&i.container.addClass("cycle-loading"))}var s;i.loader&&(s=i.API.add,i.API.add=n)})}(jQuery),/*! pager plugin for Cycle2; version: 20130525 */
function(e){"use strict";function t(t,i,n){var s,o=t.API.getComponent("pager");o.each(function(){var o=e(this);if(i.pagerTemplate){var c=t.API.tmpl(i.pagerTemplate,i,t,n[0]);s=e(c).appendTo(o)}else s=o.children().eq(t.slideCount-1);s.on(t.pagerEvent,function(e){e.preventDefault(),t.API.page(o,e.currentTarget)})})}function i(e,t){var i=this.opts();if(!i.busy||i.manualTrump){var n=e.children().index(t),s=n,o=s>i.currSlide;i.currSlide!=s&&(i.nextSlide=s,i.API.prepareTx(!0,o),i.API.trigger("cycle-pager-activated",[i,e,t]))}}e.extend(e.fn.cycle.defaults,{pager:"> .cycle-pager",pagerActiveClass:"cycle-pager-active",pagerEvent:"click.cycle",pagerTemplate:"<span>&bull;</span>"}),e(document).on("cycle-bootstrap",function(e,i,n){n.buildPagerLink=t}),e(document).on("cycle-slide-added",function(e,t,n,s){t.pager&&(t.API.buildPagerLink(t,n,s),t.API.page=i)}),e(document).on("cycle-slide-removed",function(t,i,n){if(i.pager){var s=i.API.getComponent("pager");s.each(function(){var t=e(this);e(t.children()[n]).remove()})}}),e(document).on("cycle-update-view",function(t,i){var n;i.pager&&(n=i.API.getComponent("pager"),n.each(function(){e(this).children().removeClass(i.pagerActiveClass).eq(i.currSlide).addClass(i.pagerActiveClass)}))}),e(document).on("cycle-destroyed",function(e,t){var i=t.API.getComponent("pager");i&&(i.children().off(t.pagerEvent),t.pagerTemplate&&i.empty())})}(jQuery),/*! prevnext plugin for Cycle2; version: 20130709 */
function(e){"use strict";e.extend(e.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),e(document).on("cycle-initialized",function(e,t){if(t.API.getComponent("next").on(t.nextEvent,function(e){e.preventDefault(),t.API.next()}),t.API.getComponent("prev").on(t.prevEvent,function(e){e.preventDefault(),t.API.prev()}),t.swipe){var i=t.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",n=t.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle";t.container.on(i,function(){t.API.next()}),t.container.on(n,function(){t.API.prev()})}}),e(document).on("cycle-update-view",function(e,t){if(!t.allowWrap){var i=t.disabledClass,n=t.API.getComponent("next"),s=t.API.getComponent("prev"),o=t._prevBoundry||0,c=void 0!==t._nextBoundry?t._nextBoundry:t.slideCount-1;t.currSlide==c?n.addClass(i).prop("disabled",!0):n.removeClass(i).prop("disabled",!1),t.currSlide===o?s.addClass(i).prop("disabled",!0):s.removeClass(i).prop("disabled",!1)}}),e(document).on("cycle-destroyed",function(e,t){t.API.getComponent("prev").off(t.nextEvent),t.API.getComponent("next").off(t.prevEvent),t.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery),/*! progressive loader plugin for Cycle2; version: 20130315 */
function(e){"use strict";e.extend(e.fn.cycle.defaults,{progressive:!1}),e(document).on("cycle-pre-initialize",function(t,i){if(i.progressive){var n,s,o=i.API,c=o.next,r=o.prev,l=o.prepareTx,a=e.type(i.progressive);if("array"==a)n=i.progressive;else if(e.isFunction(i.progressive))n=i.progressive(i);else if("string"==a){if(s=e(i.progressive),n=e.trim(s.html()),!n)return;if(/^(\[)/.test(n))try{n=e.parseJSON(n)}catch(d){return o.log("error parsing progressive slides",d),void 0}else n=n.split(RegExp(s.data("cycle-split")||"\n")),n[n.length-1]||n.pop()}l&&(o.prepareTx=function(e,t){var s,o;return e||0===n.length?(l.apply(i.API,[e,t]),void 0):(t&&i.currSlide==i.slideCount-1?(o=n[0],n=n.slice(1),i.container.one("cycle-slide-added",function(e,t){setTimeout(function(){t.API.advanceSlide(1)},50)}),i.API.add(o)):t||0!==i.currSlide?l.apply(i.API,[e,t]):(s=n.length-1,o=n[s],n=n.slice(0,s),i.container.one("cycle-slide-added",function(e,t){setTimeout(function(){t.currSlide=1,t.API.advanceSlide(-1)},50)}),i.API.add(o,!0)),void 0)}),c&&(o.next=function(){var e=this.opts();if(n.length&&e.currSlide==e.slideCount-1){var t=n[0];n=n.slice(1),e.container.one("cycle-slide-added",function(e,t){c.apply(t.API),t.container.removeClass("cycle-loading")}),e.container.addClass("cycle-loading"),e.API.add(t)}else c.apply(e.API)}),r&&(o.prev=function(){var e=this.opts();if(n.length&&0===e.currSlide){var t=n.length-1,i=n[t];n=n.slice(0,t),e.container.one("cycle-slide-added",function(e,t){t.currSlide=1,t.API.advanceSlide(-1),t.container.removeClass("cycle-loading")}),e.container.addClass("cycle-loading"),e.API.add(i,!0)}else r.apply(e.API)})}})}(jQuery),/*! tmpl plugin for Cycle2; version: 20121227 */
function(e){"use strict";e.extend(e.fn.cycle.defaults,{tmplRegex:"{{((.)?.*?)}}"}),e.extend(e.fn.cycle.API,{tmpl:function(t,i){var n=RegExp(i.tmplRegex||e.fn.cycle.defaults.tmplRegex,"g"),s=e.makeArray(arguments);return s.shift(),t.replace(n,function(t,i){var n,o,c,r,l=i.split(".");for(n=0;s.length>n;n++)if(c=s[n]){if(l.length>1)for(r=c,o=0;l.length>o;o++)c=r,r=r[l[o]]||i;else r=c[i];if(e.isFunction(r))return r.apply(c,s);if(void 0!==r&&null!==r&&r!=i)return r}return i})}})}(jQuery);
//@ sourceMappingURL=jquery.cycle2.js.map
@@ -0,0 +1,2 @@
/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20130909 */
(function(e){"use strict";function t(t){return{preInit:function(e){e.slides.css(n)},transition:function(i,n,s,o,r){var l=i,c=e(n),a=e(s),d=l.speed/2;t.call(a,-90),a.css({display:"block","background-position":"-90px",opacity:1}),c.css("background-position","0px"),c.animate({backgroundPosition:90},{step:t,duration:d,easing:l.easeOut||l.easing,complete:function(){i.API.updateView(!1,!0),a.animate({backgroundPosition:0},{step:t,duration:d,easing:l.easeIn||l.easing,complete:r})}})}}}function i(t){return function(i){var n=e(this);n.css({"-webkit-transform":"rotate"+t+"("+i+"deg)","-moz-transform":"rotate"+t+"("+i+"deg)","-ms-transform":"rotate"+t+"("+i+"deg)","-o-transform":"rotate"+t+"("+i+"deg)",transform:"rotate"+t+"("+i+"deg)"})}}var n,s=document.createElement("div").style,o=e.fn.cycle.transitions,r=void 0!==s.transform||void 0!==s.MozTransform||void 0!==s.webkitTransform||void 0!==s.oTransform||void 0!==s.msTransform;r&&void 0!==s.msTransform&&(s.msTransform="rotateY(0deg)",s.msTransform||(r=!1)),r?(o.flipHorz=t(i("Y")),o.flipVert=t(i("X")),n={"-webkit-backface-visibility":"hidden","-moz-backface-visibility":"hidden","-o-backface-visibility":"hidden","backface-visibility":"hidden"}):(o.flipHorz=o.scrollHorz,o.flipVert=o.scrollVert||o.scrollHorz)})(jQuery);
@@ -0,0 +1,2 @@
/*! Plugin for Cycle2; Copyright (c) 2012 M. Alsup; ver: 20121120 */
(function(a){function b(a,b,c){if(a&&c.style.filter){b._filter=c.style.filter;try{c.style.removeAttribute("filter")}catch(d){}}else!a&&b._filter&&(c.style.filter=b._filter)}"use strict",a.extend(a.fn.cycle.transitions,{fade:{before:function(c,d,e,f){var g=c.API.getSlideOpts(c.nextSlide).slideCss||{};c.API.stackSlides(d,e,f),c.cssBefore=a.extend(g,{opacity:0,display:"block"}),c.animIn={opacity:1},c.animOut={opacity:0},b(!0,c,e)},after:function(a,c,d){b(!1,a,d)}},fadeout:{before:function(c,d,e,f){var g=c.API.getSlideOpts(c.nextSlide).slideCss||{};c.API.stackSlides(d,e,f),c.cssBefore=a.extend(g,{opacity:1,display:"block"}),c.animOut={opacity:0},b(!0,c,e)},after:function(a,c,d){b(!1,a,d)}}})})(jQuery);
@@ -0,0 +1,2 @@
/*! Plugin for Cycle2; Copyright (c) 2012 M. Alsup; ver: 20121120 */
(function(a){"use strict",a.fn.cycle.transitions.scrollVert={before:function(a,b,c,d){a.API.stackSlides(a,b,c,d);var e=a.container.css("overflow","hidden").height();a.cssBefore={top:d?-e:e,left:0,opacity:1,display:"block"},a.animIn={top:0},a.animOut={top:d?e:-e}}}})(jQuery);
@@ -0,0 +1,2 @@
/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20130721 */
(function(e){"use strict";e.fn.cycle.transitions.tileSlide=e.fn.cycle.transitions.tileBlind={before:function(t,i,n,s){t.API.stackSlides(i,n,s),e(i).show(),t.container.css("overflow","hidden"),t.tileDelay=t.tileDelay||"tileSlide"==t.fx?100:125,t.tileCount=t.tileCount||7,t.tileVertical=t.tileVertical!==!1,t.container.data("cycleTileInitialized")||(t.container.on("cycle-destroyed",e.proxy(this.onDestroy,t.API)),t.container.data("cycleTileInitialized",!0))},transition:function(t,i,n,s,o){function r(e){p.eq(e).animate(I,{duration:t.speed,easing:t.easing,complete:function(){(s?v-1===e:0===e)&&t._tileAniCallback()}}),setTimeout(function(){(s?v-1!==e:0!==e)&&r(s?e+1:e-1)},t.tileDelay)}t.slides.not(i).not(n).hide();var c,l,a,d,u,p=e(),f=e(i),y=e(n),v=t.tileCount,h=t.tileVertical,g=t.container.height(),m=t.container.width();h?(l=Math.floor(m/v),d=m-l*(v-1),a=u=g):(l=d=m,a=Math.floor(g/v),u=g-a*(v-1)),t.container.find(".cycle-tiles-container").remove();var I,A={left:0,top:0,overflow:"hidden",position:"absolute",margin:0,padding:0};I=h?"tileSlide"==t.fx?{top:g}:{width:0}:"tileSlide"==t.fx?{left:m}:{height:0};var S=e('<div class="cycle-tiles-container"></div>');S.css({zIndex:f.css("z-index"),overflow:"visible",position:"absolute",top:0,left:0,direction:"ltr"}),S.insertBefore(n);for(var x=0;v>x;x++)c=e("<div></div>").css(A).css({width:v-1===x?d:l,height:v-1===x?u:a,marginLeft:h?x*l:0,marginTop:h?0:x*a}).append(f.clone().css({position:"relative",maxWidth:"none",width:f.width(),margin:0,padding:0,marginLeft:h?-(x*l):0,marginTop:h?0:-(x*a)})),p=p.add(c);S.append(p),f.hide(),y.show().css("opacity",1),r(s?0:v-1),t._tileAniCallback=function(){y.show(),f.hide(),S.remove(),o()}},stopTransition:function(e){e.container.find("*").stop(!0,!0),e._tileAniCallback&&e._tileAniCallback()},onDestroy:function(){var e=this.opts();e.container.find(".cycle-tiles-container").remove()}}})(jQuery);
+419 -4
View File
@@ -32,8 +32,285 @@ function touchSupport() {
})
}
}
function customOpenSlide() {
var $openSlide = $('.open-slide'),
$pageslideW;
$(function(){
$(window).width() > 1440 ? $pageslideW = 1024 : $pageslideW = 954;
$(window).resize(function() {
$(this).width() > 1440 ? $pageslideW = 1024 : $pageslideW = 954;
});
$noiFrame = $openSlide.not('.view-page');
$iFrame = $openSlide.filter('.view-page.open-slide');
$noiFrame.pageslide({
W: 314,
openFn: function(pageslide, element) {
element.addClass('active')
.closest('.item-menu')
.css('display', 'inline-block')
.closest('.navbar-inner')
.addClass('active');
},
closeFn: function(pageslide, element) {
$('.item-menu').removeAttr('style');
element.removeClass('active')
.closest('.navbar-inner')
.removeClass('active');
},
loadComplete: function(pageslide, element) {
$openSlide.removeClass('active');
$('.navbar-inner').removeClass('active');
$('.item-menu').removeAttr('style');
element.addClass('active')
.closest('.item-menu')
.css('display', 'inline-block')
.closest('.navbar-inner')
.addClass('active');
_type = element.hasClass('page') ? 'page' : 'link';
var _id = element.data('id'),
_parent = element.data('parent'),
_edit = element.hasClass('edit') ? true : false;
$('#pageslide .parent').val(_parent);
if(_id !== 'new') {
$('#pageslide form').attr({
'action': $('#pageslide form').attr('action') + '/' + _id,
'id': 'edit_' + _type + '_' + _id,
'method': 'put'
});
setForm(element.data('form'));
} else {
$('#pageslide form').prop('method', 'post')
};
_type == 'page' ? pageSetting(element.data('id'), _edit) : linkSetting(element.data('id'), _edit);
}
});
$iFrame.pageslide({
W: $pageslideW,
iframe: true,
openFn: function(pageslide, element) {
element.addClass('active')
.closest('.item-menu')
.css('display', 'inline-block')
.closest('.navbar-inner')
.addClass('active');
},
closeFn: function(pageslide, element) {
$('.item-menu').removeAttr('style');
element.removeClass('active')
.closest('.navbar-inner')
.removeClass('active');
$('#main-wrap').css('width', 'auto')
},
loadComplete: function(pageslide, element) {
$openSlide.removeClass('active');
$('.navbar-inner').removeClass('active');
$('.item-menu').removeAttr('style');
element.addClass('active')
.closest('.item-menu')
.css('display', 'inline-block')
.closest('.navbar-inner')
.addClass('active');
pageslide.find('.content').css('padding', 0);
iFrameContent()
}
});
}
function iFrameContent() {
function iFrameFunction(iContents, pc) {
pc.each(function(index, el) {
if($(this).siblings('*').length == 0) {
var _parentH = $(this).parent('*').outerHeight();
$(this).css('height', _parentH);
}
});
iContents.find('#orbit-bar').hide();
iContents.find('.main_wrap').css('margin-top', 0);
iContents.find('a').not('.edit_link a').on('click', function(event) {
event.preventDefault();
}).css('cursor', 'default');
}
$('#pageslide_iframe').load(function() {
var $iContents = $(this).contents(),
$pc = $iContents.find('.page_content');
$(this).get(0).contentWindow.externalFunction(iFrameFunction, $iContents, $pc);
});
}
function pageSetting(id, edit) {
$pageModule = $('#pageslide #page_module_app_id');
$pageF2E = $('#pageslide #page_app_frontend_url');
$pageDivF2E = $('#pageslide #front_url');
$pageDesign = $('#pageslide #page_design');
$pageTheme = $('#pageslide #page_theme_id');
$pageCategory = $('#pageslide #page-category');
$pageCategoryGroup = $('#pageslide #page-category-groups');
$pageTags = $('#pageslide #page-tags');
$pageTagsGroup = $('#pageslide #page-tags-groups');
$pagePublishedTrue = $('#pageslide #page_is_published_true');
$pageCount = $('#pageslide #page_count');
$pageDivCount = $('#pageslide #front_count');
_status = edit;
_ID = id;
if(_status) {
$.ajax({
url: "<%= Rails.application.routes.url_helpers.get_page_setting_json_admin_pages_path %>",
contentType: "application/json; charset=utf-8",
dataType: 'json',
data: {id: id},
cache: false,
})
.done(function(data) {
_boolean = true;
_selectData = data;
$.each(_pageData.design, function(index, val) {
$pageDesign.append('<option value="' + val.main[1] + '" ' + (val.main[1] == _selectData.design.main ? 'selected="selected"' : '') + '>' + val.main[0] + '</option>');
if(val.main[1] == _selectData.design.main) {
$.each(val.sub, function(index, val) {
$pageTheme.append('<option value="' + $(this)[1] + '" ' + ($(this)[1] == _selectData.design.sub ? 'selected="selected"' : '') + '>' + $(this)[0]+ '</option>')
});
};
});
$.each(_pageData.module, function(index, val) {
$pageModule.append('<option value="' + val.main[1] + '" ' + (val.main[1] == _selectData.module.main ? 'selected="selected"' : '') + '>' + val.main[0] + '</option>');
if(_selectData.module.main && val.main[1] == _selectData.module.main) {
$pageDivF2E.show();
$.each(val.sub, function(index, val) {
$pageF2E.append('<option value="' + $(this)[1] + '" ' + ($(this)[1] == _selectData.module.sub ? 'selected="selected"' : '') + '>' + $(this)[0]+ '</option>')
});
$.each(val.count, function(index, val) {
$pageCount.append('<option value="' + val + '" ' + (val == _selectData.module.count ? 'selected="selected"' : '') + '>' + val+ '</option>');
});
$pageDivCount.show();
if(val.category.length > 0) {
$.each(val.category, function(index, val) {
var _arr = $.inArray($(this)[1], _selectData.module.category[1]);
$pageCategory.append('<label class="checkbox"><input type="checkbox" name="page[category][]" value="'+ $(this)[1] + '">'+ $(this)[0] +'</label>');
if(!_selectData.module.category[0] && _arr !== -1) {
$pageCategory.find('input[type="checkbox"]').eq(index).prop('checked', true);
}
_selectData.module.category[0] ? $pageCategory.siblings('.checkbox').children('.select_all').prop('checked', true) : '';
});
$pageCategoryGroup.show();
}
if(val.tags.length > 0) {
$.each(val.tags, function(index, val) {
var _arr = $.inArray($(this)[1], _selectData.module.tags[1]);
$pageTags.append('<label class="checkbox"><input type="checkbox" name="page[tag][]" value="'+ $(this)[1] + '">'+ $(this)[0] +'</label>');
if(!_selectData.module.tags[0] && _arr !== -1) {
$pageTags.find('input[type="checkbox"]').eq(index).prop('checked', true);
}
_selectData.module.tags[0] ? $pageTags.siblings('.checkbox').children('.select_all').prop('checked', true) : '';
});
$pageTagsGroup.show();
}
getView(_selectData.module.main, id);
};
});
_selectData.module.public ? $pagePublishedTrue.prop('checked', true) : $pagePublishedTrue.prop('checked', false);
$.each(_selectData.module.link, function(index, val) {
if(val[1]) {
$('#pageslide .active-link.' + val[0]).find('input[type="checkbox"]').prop('checked', true).end().find('.active-mune').slideDown(300);
$('#pageslide .active-link.' + val[0]).find('input[type="radio"]').eq(val[2]).prop('checked', true);
}
});
$('#pageslide').find('.nano').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true });
$pagePublishedTrue.prop('checked') ? $('.link-options').slideDown(300) : $('.link-options').slideUp(300);
})
.fail(function(jqXHR, textStatus) {
console.log(jqXHR.status, textStatus)
var $errorMsg = '<div class="error-cover"><div class="msg"><i class="icons-warning"></i><p>Sorry! Something is wrong</p></div></div>'
$('#pageslide .view-page').append($errorMsg);
});
} else {
_boolean = false;
$.each(_pageData.design, function(index, val) {
$pageDesign.append('<option value="' + val.main[1] + '" ' + (val.main[2] ? 'selected="selected"' : '') + '>' + val.main[0] + '</option>');
if(val.main[2]) {
$.each(val.sub, function(index, val) {
$pageTheme.append('<option value="' + $(this)[1] + '">' + $(this)[0]+ '</option>')
});
};
});
$.each(_pageData.module, function(index, val) {
$pageModule.append('<option value="' + val.main[1] + '">' + val.main[0] + '</option>');
});
};
};
function linkSetting(id, edit) {
$linkPublishedTrue = $('#link_is_published_true');
_status = edit;
if(_status) {
$.ajax({
url: "<%= Rails.application.routes.url_helpers.get_link_setting_json_admin_links_path %>",
contentType: "application/json; charset=utf-8",
dataType: 'json',
data: {id: id},
cache: false,
})
.done(function(data) {
_linkData = data;
data.public ? $linkPublishedTrue.prop('checked', true) : $linkPublishedTrue.prop('checked', false);
$linkPublishedTrue.prop('checked') ? $('.link-options').slideDown(300) : $('.link-options').slideUp(300);
$.each(_linkData.link, function(index, val) {
if(val[1]) {
$('#pageslide .active-link.' + val[0]).find('input[type="checkbox"]').prop('checked', true).end().find('.active-mune').slideDown(300);
$('#pageslide .active-link.' + val[0]).find('input[type="radio"]').eq(val[2]).prop('checked', true);
}
});
$('#pageslide').find('.nano').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true });
})
.fail(function(jqXHR, textStatus) {
console.log(jqXHR.status, textStatus)
var $errorMsg = '<div class="error-cover"><div class="msg"><i class="icons-warning"></i><p>Sorry! Something is wrong</p></div></div>'
$('#pageslide .view-page').append($errorMsg);
});
}
}
function getPageData() {
$.getJSON("<%= Rails.application.routes.url_helpers.get_page_design_module_json_admin_items_path %>").done(function(data) {
_pageData = data;
});
}
function getView(module_id, id) {
var _data = {};
_data.val = $('#pageslide #page_app_frontend_url option:selected').val();
_data.id = id;
_data.module_id = module_id
$.ajax({
url: "<%= Rails.application.routes.url_helpers.get_display_style_admin_pages_path %>",
dataType: "script",
data: _data,
contentType: "application/html; charset=utf-8",
cache: false,
});
}
$(function() {
$pageModule = null,
$pageF2E = null,
$pageDivF2E = null,
$pageDesign = null,
$pageTheme = null,
$pageCategory = null,
$pageCategoryGroup = null,
$pageTags = null,
$pageTagsGroup = null,
$pagePublishedTrue = null,
$pageCount = null,
$pageDivCount = null,
$linkKey = null,
$linkUrl = null,
$linkTitle = null,
$linkPublishedTrue = null,
_boolean = null,
_ID = null,
_type = null,
_status = null,
_pageData = null,
_selectData = null,
_linkData = null;
$('.sortable').nestedSortable({
handle: '.brand',
items: 'li',
@@ -43,8 +320,14 @@ $(function(){
placeholder: 'placeholder',
startCollapsed: true,
disableNesting: 'no-nest',
stop: function(event, ui) {
$.post("<%= Rails.application.routes.url_helpers.admin_update_position_path %>", { id: ui.item.attr('id'), parent_id: (ui.item.parent().closest('li').attr('id') || ui.item.parent().closest('ol').attr('id')), position: ui.item.index() } );
update: function(event, ui) {
var position = null;
if($(ui.item).closest('ol').hasClass('item-groups')) {
position = $(ui.item).index() - 1;
} else {
position = $(ui.item).index();
};
$.post("<%= Rails.application.routes.url_helpers.update_position_admin_items_path %>", { id: ui.item.attr('id'), parent_id: (ui.item.parent().closest('li').attr('id') || ui.item.parent().closest('ol').attr('id')), position: position } );
}
});
$(".sortable").delegate(".brand, .delete", clickEvent, function(e){
@@ -59,15 +342,147 @@ $(function(){
}
e.preventDefault();
});
$("#dialog").on('show', function (e) {
$(this).find('.delete-item').on(clickEvent, function() {
$target.parents('.navbar').parent('li').remove();
$('ol').not('.sortable').each(function() {
if($(this).children('li').index() == -1) {
$(this).remove();
}
});
itemsQuantity();
$('#dialog').modal('hide');
e.preventDefault();
})
});
$('#pageslide').on('change', '.change', function(event) {
var _data, _select, _subData, $subSelete;
if(event.target.id !== 'page_app_frontend_url') {
if(event.target.id == 'page_design') {
_data = _pageData.design;
_select = _boolean ? _selectData.design : null;
_subData = 'template';
$subSelete = $('#pageslide #page_theme_id');
} else {
_data = _pageData.module;
_select = _boolean ? _selectData.module : null;
_subData = 'module';
$subSelete = $('#pageslide #page_app_frontend_url');
$pageDivF2E.show();
};
$(this).children("option:selected").each(function () {
var _val = $(this).val();
$subSelete.empty();
$pageCount.empty();
if(_val) {
$.each(_data, function(index, val) {
if(_val == val.main[1]) {
$.each(val.sub, function(index, val) {
var _selected = _select && $(this)[1] == _select.sub ? 'selected="selected"' : '';
$subSelete.append('<option value="' + $(this)[1] + '" ' + _selected.sub + '>' + $(this)[0] + '</option>');
});
$.each(val.count, function(index, val) {
$pageCount.append('<option value="' + val + '" ' + (_select && _select.main == _val && val == _selectData.module.count ? 'selected="selected"' : '') + '>' + val+ '</option>');
});
getView(val.main[1]);
$pageDivCount.show();
if(event.target.id == 'page_module_app_id') {
$pageCategory.empty();
if(val.category.length > 0) {
$.each(val.category, function(index, val) {
if(val !== 0) {
var _arr = _select ? $.inArray($(this)[1], _select.category[1]) : '';
$pageCategory.append('<label class="checkbox"><input type="checkbox" name="page[category][]" value="'+ $(this)[1] + '">'+ $(this)[0] +'</label>');
if(_select && !_select.category[0] && _arr !== -1) {
$pageCategory.find('input[type="checkbox"]').eq(index).prop('checked', true);
}
_select && _val == _select.main && _select.category[0] ? $pageCategory.siblings('.checkbox').children('.select_all').prop('checked', true) : '';
}
});
$pageCategoryGroup.show();
} else {
$pageCategoryGroup.hide();
}
$pageTags.empty();
if(val.tags.length > 0) {
$.each(val.tags, function(index, val) {
if(val !== 0) {
var _arr = _select ? $.inArray($(this)[1], _select.tags[1]) : '';
$pageTags.append('<label class="checkbox"><input type="checkbox" name="page[tag][]" value="'+ $(this)[1] + '">'+ $(this)[0] +'</label>');
if(_select && !_select.tags[0] && _arr !== -1) {
$pageTags.find('input[type="checkbox"]').eq(index).prop('checked', true);
}
_select && _val == _select.main && _select.tags[0] ? $pageTags.siblings('.checkbox').children('.select_all').prop('checked', true) : '';
}
});
$pageTagsGroup.show();
} else {
$pageTagsGroup.hide();
}
}
return false;
};
});
} else {
$pageCategory.empty();
$pageCategoryGroup.hide();
$pageTags.empty();
$pageTagsGroup.hide();
$pageF2E.empty();
$pageDivF2E.hide();
$pageCount.empty();
$pageDivCount.hide();
}
});
}
else {
getView($pageModule.val());
}
event.preventDefault();
});
$('#pageslide').on('change', '.checkbox-groups input', function(event) {
var $checked = $(this);
if($checked.attr('type') == 'checkbox') {
if($checked.hasClass('select_all') && $checked.prop('checked')) {
$checked.closest('.checkbox').siblings('.groups').find('input[type="checkbox"]').prop('checked', false);
} else if($checked.prop('checked') && !$checked.hasClass('lang-enable')) {
$checked.closest('.groups').siblings('.checkbox').find('.select_all').prop('checked', false);
} else {
if($checked.prop('checked')) {
$checked.closest('.active-link').addClass('active').siblings('active-link').removeClass('active').end().find('.active-mune').slideDown(300);
if(_status) {
var _index = $checked.closest('.link-options').find('.active').index() - 1,
_index = _type == 'page' ? _selectData.module.link[_index][1] : _linkData.link[_index][1] ;
$checked.closest('.active-link').find('.active-mune input').eq(_index).prop('checked', true);
}
} else {
$('.active-link').removeClass('active');
$checked.closest('.active-link').find('.active-mune').slideUp(300, function() {
$(this).find('input:eq(0)').prop('checked', true);
})
}
}
return false;
} else if($checked.attr('type') == 'radio' && !$(this).closest('div').hasClass('active-mune')) {
$('#pageslide #page_is_published_true').prop('checked') || $('#pageslide #link_is_published_true').prop('checked') ? $('.link-options').slideDown(300) : $('.link-options').slideUp(300);
return false;
}
event.preventDefault();
});
tip();
touchSupport()
itemsQuantity();
getPageData();
});
function reloadStructure(){
$.pageslide.close();
openSlide();
customOpenSlide();
tip();
touchSupport()
itemsQuantity();
@@ -0,0 +1,142 @@
function getPageData() {
$.getJSON("<%= Rails.application.routes.url_helpers.get_page_module_json_admin_page_parts_path %>").done(function(data) {
_pageData = data;
});
}
function getView(module_id, id) {
var _data = {};
_data.val = $('#module_widget #page_part_widget_path option:selected').val();
_data.id = id;
_data.module_id = module_id
$.ajax({
url: "<%= Rails.application.routes.url_helpers.get_display_style_admin_page_parts_path %>",
dataType: "script",
data: _data,
contentType: "application/html; charset=utf-8",
cache: false,
});
}
$(function() {
$pageModule = $('#module_widget #page_part_module_app'),
$pageF2E = $('#module_widget #page_part_widget_path'),
$pageCategory = $('#module_widget #page-category'),
$pageCategoryGroup = $('#module_widget #page-category-groups'),
$pageTags = $('#module_widget #page-tags'),
$pageTagsGroup = $('#module_widget #page-tags-groups'),
$pageCount = $('#module_widget #page_count'),
_boolean = null,
_ID = null,
_type = null,
_status = null,
_pageData = null,
_selectData = null;
$('#module_widget').on('change', '.change', function(event) {
var _data, _select, $subSelete;
if(event.target.id !== 'page_part_widget_path') {
_data = _pageData.module;
_select = _boolean ? _selectData.module : null;
$subSelete = $('#module_widget #page_part_widget_path');
$(this).children("option:selected").each(function () {
var _val = $(this).val();
$subSelete.empty();
$pageCount.empty();
if(_val) {
$.each(_data, function(index, val) {
if(_val == val.main[1]) {
$.each(val.sub, function(index, val) {
var _selected = _select && $(this)[1] == _select.sub ? 'selected="selected"' : '';
$subSelete.append('<option value="' + $(this)[1] + '" ' + _selected.sub + '>' + $(this)[0] + '</option>');
});
$.each(val.count, function(index, val) {
$pageCount.append('<option value="' + val + '" ' + (_select && _select.main == _val && val == _selectData.module.count ? 'selected="selected"' : '') + '>' + val+ '</option>');
});
getView(val.main[1]);
if(event.target.id == 'page_part_module_app') {
$pageCategory.empty();
if(val.category.length > 0) {
$.each(val.category, function(index, val) {
if(val !== 0) {
var _arr = _select ? $.inArray($(this)[1], _select.category[1]) : '';
$pageCategory.append('<label class="checkbox"><input type="checkbox" name="page[category][]" value="'+ $(this)[1] + '">'+ $(this)[0] +'</label>');
if(_select && !_select.category[0] && _arr !== -1) {
$pageCategory.find('input[type="checkbox"]').eq(index).prop('checked', true);
}
_select && _val == _select.main && _select.category[0] ? $pageCategory.siblings('.checkbox').children('.select_all').prop('checked', true) : '';
}
});
$pageCategoryGroup.show();
} else {
$pageCategoryGroup.hide();
}
if(val.tags.length > 0) {
$pageTags.empty();
$.each(val.tags, function(index, val) {
if(val !== 0) {
var _arr = _select ? $.inArray($(this)[1], _select.tags[1]) : '';
$pageTags.append('<label class="checkbox"><input type="checkbox" name="page[tag][]" value="'+ $(this)[1] + '">'+ $(this)[0] +'</label>');
if(_select && !_select.tags[0] && _arr !== -1) {
$pageTags.find('input[type="checkbox"]').eq(index).prop('checked', true);
}
_select && _val == _select.main && _select.tags[0] ? $pageTags.siblings('.checkbox').children('.select_all').prop('checked', true) : '';
}
});
$pageTagsGroup.show();
} else {
$pageTagsGroup.hide();
}
}
return false;
};
});
} else {
$pageCategory.empty();
$pageCategoryGroup.hide();
$pageTags.empty();
$pageTagsGroup.hide();
$pageF2E.empty();
$pageCount.empty();
}
});
}
else {
getView($pageModule.val());
}
event.preventDefault();
});
$('#module_widget').on('change', '.checkbox-groups input', function(event) {
var $checked = $(this);
if($checked.attr('type') == 'checkbox') {
if($checked.hasClass('select_all') && $checked.prop('checked')) {
$checked.closest('.checkbox').siblings('.groups').find('input[type="checkbox"]').prop('checked', false);
} else if($checked.prop('checked') && !$checked.hasClass('lang-enable')) {
$checked.closest('.groups').siblings('.checkbox').find('.select_all').prop('checked', false);
} else {
if($checked.prop('checked')) {
$checked.closest('.active-link').addClass('active').siblings('active-link').removeClass('active').end().find('.active-mune').slideDown(300);
if(_status) {
var _index = $checked.closest('.link-options').find('.active').index() - 1,
_index = _type == 'page' ? _selectData.module.link[_index][1] : _linkData.link[_index][1] ;
$checked.closest('.active-link').find('.active-mune input').eq(_index).prop('checked', true);
}
} else {
$('.active-link').removeClass('active');
$checked.closest('.active-link').find('.active-mune').slideUp(300, function() {
$(this).find('input:eq(0)').prop('checked', true);
})
}
}
return false;
} else if($checked.attr('type') == 'radio' && !$(this).closest('div').hasClass('active-mune')) {
$('#module_widget #page_is_published_true').prop('checked') || $('#module_widget #link_is_published_true').prop('checked') ? $('.link-options').slideDown(300) : $('.link-options').slideUp(300);
return false;
}
event.preventDefault();
});
getPageData();
});
@@ -7,32 +7,29 @@ function append_id(){
};
}
$("div.editable").live("mouseenter mouseleave", function (event) {
$(this).children('.edit_link').toggle();
$(document).on('change', 'select', function(e) {
if(!e.target.className == 'widget_field_select') {
switch(e.target.id) {
case 'page_module_app_id':
$.getScript($(this).attr('rel') + '?module_app_id='+$(this).val() + append_id());
break;
case 'page_app_frontend_url':
case 'page_part_widget_path':
$.getScript($(this).attr('rel') +'?frontend=' + $(this).val() + '&module_app_id=' + $("#module_app_list select").val() + append_id() );
break;
case 'page_design':
$.getScript($(this).attr('rel') + '?design_id=' + $(this).val() + append_id());
break;
case 'page_part_public_r_tag':
$.getScript($(this).attr('rel') + '?type=' + $(this).val() + append_id());
break;
};
} else {
$.getScript($(this).attr('rel') + '?widget_field_value='+ $(this).val()+'&dom_id=' + $(this).attr("id") + '&field_seri=' +$(this).attr('field_seri')+ '&module_app_id=' +$("#page_module_app_id,page_part_module_app_id").val() + append_id() );
}
});
$("#page_design").live('change', function() {
$.getScript($(this).attr('rel') + '?design_id=' + $(this).val() + append_id());
});
$("#module_app_list select").live('change', function() {
$.getScript($(this).attr('rel') + '?module_app_id='+$(this).val() + append_id());
});
$("#widget_list select, #frontend_list select").live('change', function() {
$.getScript($(this).attr('rel') +'?frontend=' + $(this).val() + '&module_app_id=' + $("#module_app_list select").val() + append_id() );
});
$("#tag_list select").live('change', function() {
$.getScript($(this).attr('rel') + '?type=' + $(this).val() + append_id() );
});
$("select.widget_field_select").live('change', function() {
$.getScript($(this).attr('rel') + '?widget_field_value='+ $(this).val()+'&dom_id=' + $(this).attr("id") + '&field_seri=' +$(this).attr('field_seri')+ '&module_app_id=' +$("#page_module_app_id,page_part_module_app_id").val() + append_id() );
});
$('.part_kind').live('click', function() {
$(document).on('click', '.part_kind', function(event) {
$('.part_kind_partial').hide();
$('#part_' + $(this).attr('value')).show();
});
});
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,124 @@
/* ===================================================
* jquery-lite-image-resize v.1.0.1
* https://github.com/RayChang/jquery-lite-image-resize
* ===================================================
* How to use ?
*
* HTML element closest to the image to add class "resizeimg".
*
* Example:
* <div class="resizeimg">
* <img src="images url" />
* </div>
*
* Or you can use:
* $('your class').rsImg();
*
* Note : HTML structure must be a structure like the example above.
*
*/
!function ($) {
"use strict";
var ResizeImg = function(element) {
this.element = $(element);
this.element.data('exists', true);
};
ResizeImg.prototype.resize = function() {
var $img = this.element.children('img').eq(0),
elW = this.element.innerWidth(),
elH = this.element.innerHeight(),
elScale = elW/elH,
image = document.createElement("img");
image.src = $img.attr('src');
this.element.css({
'position': 'relative',
'overflow': 'hidden',
});
function imageLoadComplete() {
var imgW = image.width,
imgH = image.height,
imgScale = imgW/imgH,
portrait = {
'position': 'absolute',
'height': '100%',
'width': 'auto',
'max-width': 'none',
'left': '50%',
'top': 0,
'margin-left': imgW*(elH/imgH)/-2
},
landscape = {
'position': 'absolute',
'height': 'auto',
'max-height': 'none',
'width': '100%',
'left': 0,
'top': '50%',
'margin-top': imgH*(elW/imgW)/-2
},
center = {
'position': 'absolute',
'height': '100%',
'width': '100%',
'top': 0,
'left': 0
};
if(imgScale < 1) {
if(elScale < 1) {
if(elScale > imgScale) {
$img.css(landscape);
} else {
$img.css(portrait);
};
} else {
$img.css(landscape);
};
};
if(imgScale > 1) {
if(elScale > 1) {
if(elScale > imgScale) {
$img.css(landscape);
} else {
$img.css(portrait);
};
} else {
$img.css(portrait);
};
};
if(imgScale == 1) {
if(elScale < 1) {
$img.css(portrait);
} else if(elScale > 1) {
$img.css(landscape);
} else {
$img.css(center);
};
};
$img.fadeTo(500, 1);
}
if(/MSIE 8.0/g.test($ua)) {
imageLoadComplete();
} else {
image.onload = imageLoadComplete;
}
};
$.fn.rsImg = function () {
this.each(function () {
if(!$(this).data('exists')) {
$(this).children("img").fadeTo(0,0);
new ResizeImg(this).resize();
};
});
};
$(function() {
$('.resizeimg').rsImg();
});
}(window.jQuery);
+78 -41
View File
@@ -12,13 +12,14 @@
!(function($){
// Convenience vars for accessing elements
var $body = $('#main-wrap'),
$bottomNav = $('.bottomnav'),
$pageslide = $('#pageslide'),
$viewPage = $('#view-page');
var _sliding = false, // Mutex to assist closing only once
_lastCaller; // Used to keep track of last element to trigger pageslide
// If the pageslide element doesn't exist, create it
// If the pageslide element doesn't exist, create it
if( $pageslide.length == 0 ) {
$pageslide = $('<div />').attr( 'id', 'pageslide' )
.css( 'display', 'none' )
@@ -28,11 +29,12 @@
/*
* Private methods
*/
function _load( url, useIframe ) {
function _load( url, useIframe, callback,element ) {
// Are we loading an element from the page or a URL?
if ( url.indexOf("#") === 0 ) {
// Load a page element
$(url).clone(true).appendTo( $pageslide.empty() ).show();
if(callback)callback.call(this,$pageslide,element);
} else {
// Load a URL. Into an iframe?
if( useIframe ) {
@@ -49,9 +51,18 @@
$viewPage.find('.content').html( iframe );
$viewPage.clone(true).appendTo( $pageslide.empty() ).show();
$viewPage.find('.content').empty();
if(callback)callback.call(this,$viewPage,element);
} else {
$viewPage.find('.content').load(url, function(){
$viewPage.clone(true).appendTo( $pageslide.empty() ).show();
if($('#filter-default-tag').length) {
$('#filter-default-tag').fastLiveFilter('.add-default-tags-list', '.filter-item', '.tag');
addTagsTab();
$('#view-page .card').cardCheck({
item: $('#view-page input[type="checkbox"]'),
});
};
if(callback)callback.call(this,$viewPage,element);
});
}
@@ -64,10 +75,11 @@
function _start( direction, speed ) {
var slideWidth = $pageslide.outerWidth( true ),
bodyAnimateIn = {},
bottomnavAnimateIn = {},
slideAnimateIn = {};
// If the slide is open or opening, just ignore the call
if( $pageslide.is(':visible') || _sliding ) return;
if( $pageslide.is(':visible') || _sliding ) return;
_sliding = true;
switch( direction ) {
@@ -83,6 +95,7 @@
$pageslide.css({ left: '-' + (slideWidth-61) + 'px', right: 'auto' });
};
bodyAnimateIn['margin-left'] = '+=' + slideWidth;
bottomnavAnimateIn['left'] = '+=' + slideWidth;
if($(window).width() <= 1440 && slideWidth > 963 ) {
bodyAnimateIn['width'] = $body.width();
}
@@ -92,6 +105,7 @@
// Animate the slide, and attach this slide's settings to the element
$body.animate(bodyAnimateIn, speed);
$bottomNav.animate(bottomnavAnimateIn, speed);
$pageslide.show().animate(slideAnimateIn, speed, function() {
_sliding = false;
$pageslide.children('.nano').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true });
@@ -108,7 +122,7 @@
$.fn.pageslide = function(options) {
var $elements = this;
// On click
$elements.on(clickEvent, function(e) {
$elements.bind(clickEvent, function(e) {
var $self = $(this),
settings = $.extend({ href: $self.attr('href') }, options);
@@ -121,7 +135,7 @@
$.pageslide.close();
} else {
// Open
$.pageslide( settings );
$.pageslide( settings,$self );
if($('.item-groups').length) {
$('.item-menu > a, .navbar-inner').removeClass("active");
@@ -140,7 +154,16 @@
$pageName = $self.parents('.item-title').children('a').text();
$('.page-name').text($pageName);
} else if($('.tags-groups').length) {
$(this).parents('li').addClass("active").siblings().removeClass("active").parent('ul').siblings().children('li').removeClass("active");
if($('.gallery').length) {
$(this).closest('.rgalbum').addClass('active-single').siblings().removeClass('active-single');
if($(this).closest('ul').hasClass('photo-action')) {
$('.checkbox').prop('checked', false);
$('.rgalbum').removeClass('active');
$('.deletephoto, .deselect, .addtags').addClass('hide');
}
} else {
$(this).closest('li').addClass("active").siblings().removeClass("active").parent('ul').siblings().children('li').removeClass("active");
}
} else {
$(this).parents("tr").addClass("active").siblings().removeClass("active");;
}
@@ -151,9 +174,9 @@
};
});
};
/*
};
/*
* Default settings
*/
$.fn.pageslide.defaults = {
@@ -164,18 +187,18 @@
href: null, // Override the source of the content. Optional in most cases, but required when opening pageslide programmatically.
W: 264,
closeFn : null,
openFn : null
openFn : null,
loadComplete : null
};
/*
/*
* Public methods
*/
// Open the pageslide
$.pageslide = function( options ) {
// Extend the settings with those the user has provided
// Open the pageslide
$.pageslide = function( options,element ) {
// Extend the settings with those the user has provided
var settings = $.extend({}, $.fn.pageslide.defaults, options);
var convertToFunction = function(fn){
var x = new Function();
x = fn;
@@ -190,16 +213,19 @@
if(settings.closeFn) {
$.fn.pageslide.defaults.closeFn = convertToFunction(settings.closeFn);
}
// Are we trying to open in different direction?
if(settings.loadComplete) {
$.fn.pageslide.defaults.loadComplete = convertToFunction(settings.loadComplete);
}
// Are we trying to open in different direction?
if( ($pageslide.is(':visible') && $pageslide.data( 'W' ) != settings.W) || ($pageslide.is(':visible') && $pageslide.data( 'direction' ) != settings.direction) ) {
$.pageslide.close(function(){
$pageslide.css({'width': settings.W});
_load( settings.href, settings.iframe );
_load( settings.href, settings.iframe, settings.loadComplete, element );
_start( settings.direction, settings.speed );
});
} else {
_load( settings.href, settings.iframe );
_load( settings.href, settings.iframe, settings.loadComplete,element );
if( $pageslide.is(':hidden') ) {
$pageslide.css({'width': settings.W});
_start( settings.direction, settings.speed );
@@ -218,18 +244,19 @@
};
};
};
// Close the pageslide
$.pageslide.close = function( callback ) {
// Close the pageslide
$.pageslide.close = function( callback ) {
var $pageslide = $('#pageslide'),
slideWidth = $pageslide.outerWidth( true ),
speed = $pageslide.data( 'speed' ),
bodyAnimateIn = {},
bottomnavAnimateIn = {};
slideAnimateIn = {}
// If the slide isn't open, just ignore the call
if( $pageslide.is(':hidden') || _sliding ) return;
if( $pageslide.is(':hidden') || _sliding ) return;
_sliding = true;
switch( $pageslide.data( 'direction' ) ) {
@@ -239,9 +266,10 @@
break;
default:
bodyAnimateIn['margin-left'] = '-=' + slideWidth;
bottomnavAnimateIn['left'] = '-=' + slideWidth;
slideAnimateIn['left'] = '-=' + slideWidth;
if($pageslide.find('.preview').length) {
// $pageslide.find('.preview').cycle('destroy');
$pageslide.find('.preview').cycle('destroy');
$pageslide.find('.preview img').removeAttr('style');
}
break;
@@ -257,11 +285,13 @@
}
} else if($('.tags-groups').length) {
$('.tags-groups').children('li').removeClass("active");
$('.rgalbum').removeClass("active-single");
} else {
$("tr").removeClass("active");
};
$pageslide.animate(slideAnimateIn, speed);
$bottomNav.animate(bottomnavAnimateIn, speed);
$body.animate(bodyAnimateIn, speed, function() {
$pageslide.hide();
_sliding = false;
@@ -287,26 +317,33 @@
$.fn.pageslide.defaults.openFn = callback;
};
};
/* Events */
// Don't let clicks to the pageslide close the window
//data load complete callback
$.pageslide.loadComplete = function(callback) {
if(typeof callback === "function"){
$.fn.pageslide.defaults.loadComplete = callback;
};
};
/* Events */
// Don't let clicks to the pageslide close the window
$pageslide.click(function(e) {
e.stopPropagation();
});
// Close the pageslide if the document is clicked or the users presses the ESC key, unless the pageslide is modal
$(document).bind('click keyup', function(e) {
// If this is a keyup event, let's see if it's an ESC key
// Close the pageslide if the document is clicked or the users presses the ESC key, unless the pageslide is modal
$(document).bind('click keyup', function(e) {
// If this is a keyup event, let's see if it's an ESC key
if( e.type == "keyup" && e.keyCode != 27) return;
// Make sure it's visible, and we're not modal
if( $pageslide.is( ':visible' ) && !$pageslide.data( 'modal' ) ) {
$.pageslide.close();
}
});
// Make sure it's visible, and we're not modal
if( $pageslide.is( ':visible' ) && !$pageslide.data( 'modal' ) ) {
$.pageslide.close();
}
});
function setScroll(){
$pageslide.children('.nano').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true }); // set nano scroll
};
})(jQuery);
-9
View File
@@ -1,9 +0,0 @@
/**
* jQuery.Preload - Multifunctional preloader
* Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com
* Dual licensed under MIT and GPL.
* Date: 3/25/2009
* @author Ariel Flesler
* @version 1.0.8
*/
;(function($){var h=$.preload=function(c,d){if(c.split)c=$(c);d=$.extend({},h.defaults,d);var f=$.map(c,function(a){if(!a)return;if(a.split)return d.base+a+d.ext;var b=a.src||a.href;if(typeof d.placeholder=='string'&&a.src)a.src=d.placeholder;if(b&&d.find)b=b.replace(d.find,d.replace);return b||null}),data={loaded:0,failed:0,next:0,done:0,total:f.length};if(!data.total)return finish();var g=$(Array(d.threshold+1).join('<img/>')).load(handler).error(handler).bind('abort',handler).each(fetch);function handler(e){data.element=this;data.found=e.type=='load';data.image=this.src;data.index=this.index;var a=data.original=c[this.index];data[data.found?'loaded':'failed']++;data.done++;if(d.enforceCache)h.cache.push($('<img/>').attr('src',data.image)[0]);if(d.placeholder&&a.src)a.src=data.found?data.image:d.notFound||a.src;if(d.onComplete)d.onComplete(data);if(data.done<data.total)fetch(0,this);else{if(g&&g.unbind)g.unbind('load').unbind('error').unbind('abort');g=null;finish()}};function fetch(i,a,b){if(a.attachEvent&&data.next&&data.next%h.gap==0&&!b){setTimeout(function(){fetch(i,a,1)},0);return!1}if(data.next==data.total)return!1;a.index=data.next;a.src=f[data.next++];if(d.onRequest){data.index=a.index;data.element=a;data.image=a.src;data.original=c[data.next-1];d.onRequest(data)}};function finish(){if(d.onFinish)d.onFinish(data)}};h.gap=14;h.cache=[];h.defaults={threshold:2,base:'',ext:'',replace:''};$.fn.preload=function(a){h(this,a);return this}})(jQuery);
+13
View File
@@ -0,0 +1,13 @@
/**
* jQuery.Preload
* https://github.com/htmlhero/jQuery.preload
*
* Created by Andrew Motoshin
* http://htmlhero.ru
*
* Version: 1.5.0
* Requires: jQuery 1.6+
*
*/
!function(a){a.preload=function(){var b=[],c=function(a){for(var c=0;c<b.length;c++)if(b[c].src===a.src)return b[c];return b.push(a),a},d=function(a,b,c){"function"==typeof b&&b.call(a,c)};return function(b,e,f){if("undefined"!=typeof b){"string"==typeof b&&(b=[b]),2===arguments.length&&"function"==typeof e&&(f=e,e=0);var g,h=b.length;if(e>0&&h>e&&(g=b.slice(e,h),b=b.slice(0,e),h=b.length),!h)return d(b,f,!0),void 0;for(var i,j=arguments.callee,k=0,l=function(){k++,k===h&&(d(b,f,!g),j(g,e,f))},m=0;m<b.length;m++)i=new Image,i.src=b[m],i=c(i),i.complete?l():a(i).on("load error",l)}}}();var b=function(b,c){var d,e,f,g,h,i=[],j=new RegExp("url\\(['\"]?([^\"')]*)['\"]?\\)","i");return c.recursive&&(b=b.find("*").add(b)),b.each(function(){for(d=a(this),e=d.css("background-image")+","+d.css("border-image-source"),e=e.split(","),h=0;h<e.length;h++)f=e[h],-1===f.indexOf("about:blank")&&-1===f.indexOf("data:image")&&(g=j.exec(f),g&&i.push(g[1]));"IMG"===this.nodeName&&i.push(this.src)}),i};a.fn.preload=function(){var c,d;1===arguments.length?"object"==typeof arguments[0]?c=arguments[0]:d=arguments[0]:arguments.length>1&&(c=arguments[0],d=arguments[1]),c=a.extend({recursive:!0,part:0},c);var e=this,f=b(e,c);return a.preload(f,c.part,function(a){a&&"function"==typeof d&&d.call(e.get())}),this}}(jQuery);
+101
View File
@@ -0,0 +1,101 @@
var ListCheck = function(element) {
this.element = $(element);
this.element.data('exists', true);
if(this.element.context.parentNode.tagName == "TD") {
this.elementWrap = $(this.element.context.parentNode);
this.elementWrap.addClass('listCheck');
} else if(this.element.context.parentNode.tagName == "TH") {
this.elementWrap = $(this.element.context.parentNode);
this.elementWrap.addClass('listCheckHead');
}
this.element.before('<i class="icon-check-empty" />');
};
$.fn.listCheck = function (callback) {
this.each(function (i) {
if(!$(this).data('exists')) {
new ListCheck(this);
};
});
this.on(clickEvent, function(e) {
if($(this).prop('checked')) {
$(this).siblings('i').addClass('icon-check').removeClass('icon-check-empty').closest('tr').addClass('checkHit');
} else {
$(this).siblings('i').addClass('icon-check-empty').removeClass('icon-check').closest('tr').removeClass('checkHit');
};
if ($(this).closest('.listCheckHead').length) {
$('.listCheck .list-check').prop('checked', $(this).prop('checked'));
if($(this).prop('checked')) {
$('.listCheck i').addClass('icon-check').removeClass('icon-check-empty').closest('tr').addClass('checkHit');
} else {
$('.listCheck i').addClass('icon-check-empty').removeClass('icon-check').closest('tr').removeClass('checkHit');
}
};
var _isCheck = $('tbody .list-check').filter(':checked').length,
_defaultLength = $('tbody .list-check').length;
if(_isCheck > 0 && _isCheck < _defaultLength) {
$('.listCheckHead i').removeClass('icon-check-empty icon-check').addClass('icon-minus');
} else if(!_isCheck) {
$('.listCheckHead i').removeClass('icon-minus icon-check').addClass('icon-check-empty');
} else {
$('.listCheckHead i').removeClass('icon-check-empty icon-minus').addClass('icon-check');
}
_isCheck ? $('.list-active-btn').removeClass('disabled').data('actionable', true) : $('.list-active-btn').addClass('disabled').data('actionable', false);
});
};
function clearCheck() {
$('.list-check').each(function() {
$(this).prop('checked', false);
})
}
function actionSuccess(e) {
$("tbody .list-check").each(function() {
switch(e) {
case 'list-be-hide':
$(this).filter(':checked').closest('tr').addClass('checkHide');
break;
case 'list-be-show':
$(this).filter(':checked').closest('tr').removeClass('checkHide');
break;
case 'list-be-remove':
$(this).filter(':checked').closest('tr').fadeOut(300, function() {
$(this).remove();
});
break;
};
$('.list-check').siblings('i').removeAttr('class').addClass('icon-check-empty').closest('tr').removeClass('checkHit');
});
clearCheck();
}
$(function() {
var $t = null,
_data = null;
clearCheck();
$('.list-check').listCheck();
$('.list-active-btn').data('actionable', false).on(clickEvent, function(e) {
$t = $(this)
_data = $(this).data()
_data.actionable ? $('#dialog').modal('show') : "";
e.preventDefault();
});
$('.delete-item').on(clickEvent, function() {
var _v = [];
$("tbody .list-check").each(function() {
this.checked && _v.push("ids[]="+this.value)
});
var _t = $t.attr("rel");
if(_t.indexOf("?") > -1) {
$.ajax(_t + "&" + _v.join("&")).done(function() {
actionSuccess(_data.checkAction)
});
} else {
$.ajax(_t + "?" + _v.join("&")).done(function() {
actionSuccess(_data.checkAction)
});
}
$('#dialog').modal('hide');
$('.list-active-btn').addClass('disabled').data('actionable', false);
});
});
+1 -35
View File
@@ -1,37 +1,3 @@
function loadViewPage(url, id) {
var $listView = $(id);
$listView.empty().removeClass('in active');
$listView.load(url, function(response, status, xhr) {
$(this).addClass('in active');
$('#member-card').imagesLoaded(function() {
$('#member-card .member-avatar img').muImageResize({width: 150, height:150});
});
$('#member-abstract').imagesLoaded(function() {
$('#member-abstract .member-avatar img').muImageResize({width: 250, height:120});
});
})
}
$(function() {
$search = window.location.pathname.substring(1);
$search = $search.split("/");
$search = $search[$search.length-1];
$viewType = window.localStorage.getItem('viewType') || '#member-list';
$viewSwitchNo = window.localStorage.getItem('viewSwitchNo') || 0;
if($search == 'users-registrant-list.shtml') {
loadViewPage('member-registrant-list.html ' + $viewType, '#list-view');
} else {
loadViewPage('member-list.html ' + $viewType, '#list-view');
};
$('.view-switch').children('.btn').eq($viewSwitchNo).addClass('active');
$('.view-switch').delegate(".btn", 'click', function(e){
var url = $(this).attr('href'),
ID = url.split("#"),
ID = '#' + ID[ID.length-1];
window.localStorage.setItem('viewType', ID);
window.localStorage.setItem('viewSwitchNo', $(this).index());
loadViewPage(url, '#list-view');
e.preventDefault();
});
$('.member-avatar').rsImg();
})
+30 -27
View File
@@ -1,3 +1,4 @@
var H,P = [];
// Go to
!function ($) {
$.fn.goTo = function (){
@@ -13,43 +14,45 @@
}
}(window.jQuery);
function checkHeight() {
if($('#member-module').height() > $(window).height()) {
H = $(window).height()-
parseInt($('.wrap-inner').css('padding-top'))+
parseInt($('.wrap-inner').css('padding-bottom'))-
$('#orbit-bar').outerHeight(true);
}else{
H = $(window).height()-
parseInt($('.wrap-inner').css('padding-top'))+
parseInt($('.wrap-inner').css('padding-bottom'))-
$('#filter').outerHeight()+
parseInt($('#filter').css('margin-bottom'))-
$('#orbit-bar').outerHeight(true);
};
// if($('#member-module').height() > $(window).height()) {
// H = $(window).height()-
// parseInt($('.wrap-inner').css('padding-top'))+
// parseInt($('.wrap-inner').css('padding-bottom'))-
// $('#orbit-bar').outerHeight(true);
// }else{
// H = $(window).height()-
// parseInt($('.wrap-inner').css('padding-top'))+
// parseInt($('.wrap-inner').css('padding-bottom'))-
// $('#filter').outerHeight()+
// parseInt($('#filter').css('margin-bottom'))-
// $('#orbit-bar').outerHeight(true);
// };
H = $(window).height()-
parseInt($('.wrap-inner').css('padding-top'))-
$('#orbit-bar').outerHeight(true);
$('#basic-info').height(H);
$('#member-roles').height(H-$('.member-avatar').outerHeight(true)-parseInt($('#member-roles').css('margin-top')))
$('#member-roles').height(H-$('.member-avatar').outerHeight(true)-parseInt($('#member-roles').css('margin-top'))+20);
$('#module-content').height(H-$('#module-navbar .navbar').outerHeight(true)-$('.bottomnav').innerHeight());
};
$(function() {
var H;
checkHeight();
$(window).resize(function() {
checkHeight();
// setModuleBlockWidth();
});
$('.wrap-inner').css('padding-bottom', 0);
$(window).resize(checkHeight);
$('#member-roles h4 > span').each(function() {
$(this).css('margin-left',function() {
return $(this).innerWidth()/2*-1;
})
})
$('#basic-info').scrollToFixed({
marginTop: $('#orbit-bar').outerHeight(true)+20,
});
$('#module-navbar').scrollToFixed({
marginTop: $('#orbit-bar').outerHeight(true),
});
// $('#basic-info').scrollToFixed({
// marginTop: $('#orbit-bar').outerHeight(true)+20,
// });
// $('#module-navbar').scrollToFixed({
// marginTop: $('#orbit-bar').outerHeight(true),
// });
// $('.member-avatar').imagesLoaded(function() {
// $('#basic-info .member-avatar img').muImageResize({width: 100, height:100});
// });
$('#member-roles').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true });
})
$('.member-avatar').rsImg();
$('#member-roles, #module-content .nano').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true });
});
@@ -191,12 +191,17 @@ function returnAddressForm(element, decide) {
$(function() {
appendIndex = null;
if($('#new-user-forms').length) {
if($('#user-forms').length) {
addressVal = [];
addressArray = [];
addressInputId = [];
roleType = null;
returnDecide = false;
$('.attributes').each(function() {
if($(this).find('.toggle-check').attr('value') == "true") {
$(this).addClass('disabled').children('.attributes-body').hide();
}
});
$('.returnDecide').on(clickEvent, function() {
returnDecide = true;
})
@@ -215,21 +220,21 @@ $(function() {
});
$('#address-field').on('show', getAddressForm($trigger, $('#address-field'), true));
});
$('#new-user-forms').delegate('.togglebox, .delete, .trigger, .remove-input', clickEvent, function(event) {
$('#user-forms').delegate('.togglebox, .delete, .trigger, .remove-input', clickEvent, function(event) {
if($(this).hasClass('togglebox')) {
if($(this).hasClass('disabled')) {
$(this).find('.toggle-check')
.attr('value', 'false')
.closest('.attributes')
.removeClass('disabled')
.find('.attributes-body')
.children('.attributes-body')
.fadeIn(300);
} else {
$(this).find('.toggle-check')
.attr('value', 'true')
.closest('.attributes')
.addClass('disabled')
.find('.attributes-body')
.children('.attributes-body')
.fadeOut(300);
}
$(this).toggleClass('disabled');
@@ -422,12 +427,13 @@ $(function() {
if($(this).hasClass('trigger')) {
// appendIndex = $(this).closest('.controls').find('.input-append').length;
appendIndex = $(this).closest('.controls').find('.input-append:last-child').children('input:first-child').attr('name');
appendIndex = appendIndex.split("][");
appendIndex = parseInt(appendIndex[appendIndex.length-2])+1;
// appendIndex = appendIndex.split("][");
// appendIndex = parseInt(appendIndex[appendIndex.length-2])+1;
appendIndex = parseInt(appendIndex.match(/[^[\D\]]+(?=])/g)[1])+1;
console.log(appendIndex)
attributeIndex = $(this).closest('.attributes').index();
templateType = $(this).closest('.attributes').find('.dataType').children("option:selected").attr('ref');
$("#template-input-append").tmpl(setData(attributeIndex, templateType, appendIndex)).appendTo($(this).closest('.controls').find('.add-target'));
inputAppendLength();
};
if($(this).hasClass('remove-input')) {
@@ -0,0 +1,56 @@
function dragMode() {
$('#card-list').sortable({
placeholder: "highlight",
update: function( event, ui ) {
var _userPosition = {};
_userPosition.position = $(ui.item).index();
_userPosition.id = $(ui.item).data('user-id');
$.ajax({
url: "<%= Rails.application.routes.url_helpers.update_order_card_admin_users_new_interface_index_path %>",
type: 'POST',
dataType: 'script',
data: {users: _userPosition}
});
}
});
$('#card-list').disableSelection();
}
function typeMode() {
var _userPosition = [];
$('#list-view tbody tr').each(function(i) {
$(this).data('user-index', i);
});
$('#member-list').on(clickEvent, '.edit_position', function(e){
var $input = $('<input type="text">'),
$cross = $('<a class="btn btn-mini"><i class="icons-cross"/></a>');
if($(this).siblings('input').length) {
$(this).siblings('input').attr('type', 'text').after($cross);
} else {
$(this).after($cross);
$(this).after($input);
}
$(this).hide();
$input.val($(this).text());
e.preventDefault();
$cross.click(function(event) {
$input.remove();
$(this).siblings('a').show().end().remove();
});
});
$('.bottomnav').on(clickEvent, '.btn', function(e) {
_userPosition = [];
$('#member-list tbody input').each(function(i) {
_userPosition.push([$(this).val(), $(this).siblings('a').data('user-id')]);
});
$.ajax({
url: "<%= Rails.application.routes.url_helpers.update_order_list_admin_users_new_interface_index_path %>",
type: 'POST',
dataType: 'script',
data: {users: _userPosition}
});
e.preventDefault();
});
};
@@ -1,4 +1,4 @@
$(function() {
function textareaResizable() {
var $btnW = null,
$textareaLangBtnGroup = $('.textarea-lang > .btn-group'),
$textareaLang = $('.textarea-lang'),
@@ -8,12 +8,12 @@ $(function() {
$btnW = 4
$(this).find('.btn').each(function() {
$btnW += $(this).outerWidth(true);
$(this).on('click', function() {
$(this).on(clickEvent, function() {
var $id = $($(this).attr('href'));
if($id.find('.ui-wrapper').height() < 96) {
$id.find('.ui-wrapper').height(96)
}
})
};
});
});
});
$textarea.each(function() {
@@ -26,4 +26,7 @@ $(function() {
minWidth: $btnW+114,
handles: "se",
});
};
$(function() {
textareaResizable();
});
+51 -30
View File
@@ -2,7 +2,7 @@
//Ex preview trigger:
// <%= link_to "NewPreview", realtime_preview_admin_ad_banner_path(ad_banner_tab) , :class=>'preview_trigger'%>
$(document).ready(function() {
$(function() {
// $(".post_preview").click(function(e){
// $("#main-wrap").after("<span id='show_preview'></span>");
// e.preventDefault();
@@ -25,21 +25,57 @@ $(document).ready(function() {
// form.submit();
// //return false;
// });
$("button.post_preview").click(function(){
var btn = document.getElementById("button_for_preview");
var attrs = btn.attributes;
var url = attrs['url'];
// url = url.replace("url=","");
$("form.previewable").ajaxSubmit({
beforeSubmit: function(a,f,o){
$("#main-wrap").after("<span id='show_preview'></span>");
o.dataType = 'script';
o.url = url.nodeValue;
o.type = 'post';
},success: function(msg) { }
// /panel/announcement/back_end/bulletins/preview
$('#main-wrap').on(clickEvent, '.post_preview, .preview_trigger', function(e) {
$("#main-wrap").after("<span id='show_preview'></span>");
if($(this).hasClass('post_preview')) {
var attrs = e.target.attributes;
var url = attrs['url'];
$("form.previewable").ajaxSubmit({
beforeSubmit: function(a,f,o){
o.dataType = 'script';
o.url = url.nodeValue;
o.type = 'post';
},success: function(msg) {
$('#show_preview .modal').modal()
$('#show_preview .modal').height(function() {
return $(window).height() * 0.7;
});
}
});
})
});
} else if($(this).hasClass('preview_trigger')) {
$.ajax({
type: 'PUT',
url: $(this).attr("href"),
data: $(this).parents("form").serialize(),
success: function (msg) {
$('#show_preview .modal').modal();
$('#show_preview .modal').height(function() {
return $(window).height() * 0.7;
});
},
error: function(){
alert("ERROR");
}
});
return false;
}
});
// $("a.preview_trigger").on('click',function(){
// $("#main-wrap").after("<span id='show_preview'></span>");
// $.ajax({
// type: 'PUT',
// url:$(this).attr("href"),
// data:$(this).parents("form").serialize(),
// success: function (msg) {
// $("#"+start_modal_with_id).modal('show'); },
// error: function(){
// alert("ERROR");
// }
// });
// return false;
// });
// $("form.nccu_ajax_form").ajaxForm({
// beforeSubmit: function(a,f,o) {
// // if(clicked_what.hasClass("post_preview")){
@@ -54,19 +90,4 @@ $(document).ready(function() {
// // }
// }
// })
$("a.preview_trigger").on('click',function(){
$("#main-wrap").after("<span id='show_preview'></span>");
$.ajax({
type: 'PUT',
url:$(this).attr("href"),
data:$(this).parents("form").serialize(),
success: function (msg) {
$("#"+start_modal_with_id).modal('show'); },
error: function(){
alert("ERROR");
}
});
return false;
});
});
@@ -0,0 +1,8 @@
$(function() {
$('.module-area [data-toggle=buttons-checkbox]').find('input[type="checkbox"]').each(function() {
$(this).prop('checked') ? $(this).siblings('input[type="hidden"]').val(1) : $(this).siblings('input[type="hidden"]').val(0);
});
$('.module-area').delegate('input[type="checkbox"]', clickEvent, function(event) {
$(this).prop('checked') ? $(this).siblings('input[type="hidden"]').val(1) : $(this).siblings('input[type="hidden"]').val(0);
});
});
+347
View File
@@ -0,0 +1,347 @@
!function ($) {
// Convenience vars for accessing elements
var $pageslide = $('#pageslide'),
$body = $('#main-wrap'),
$bottomNav = $('.bottomnav'),
$element;
if($pageslide.length == 0) {
var _html = '<div id="pageslide"><div class="page-title clearfix"><a class="pull-right" href="javascript:$.pageslide.close()"><i class="icons-arrow-left-2"/></a><span/></div><div class="view-page"><div class="nano"><div class="content"/></div></div></div>';
$pageslide = $(_html).css('display', 'none').appendTo( $body );
} else {
$pageslide.css('display', 'none')
}
var _sliding = false, // Mutex to assist closing only once
_lastCaller; // Used to keep track of last element to trigger pageslide
// $(window).resize(function(event) {
// if($pageslide.is(':visible')) {
// console.log("ddd")
// $pageslide.find('.nano').height($('body').height() - $('#orbit-bar').height() - $pageslide.find('.page-title').outerHeight(true));
// }
// });
function _checkTitle(settings) {
if(settings.pageTitle) {
$pageslide.find('.page-title').show().children('span').text(settings.pageTitle);
$pageslide.find('.view-page').css('top', 48);
} else {
$pageslide.find('.page-title').hide();
$pageslide.find('.view-page').css('top', 0);
}
}
function _load(settings) {
// Are we loading an element from the page or a URL?
if ( settings.href.indexOf("#") === 0 ) {
// Load a page element
window.console.log("in HTML");
var _contentHtml = $(settings.href).html();
var dtd = $.Deferred();
function appendHtml(dtd) {
$pageslide.find('.content').html(_contentHtml);
if($pageslide.find('.content').find('*').length !== 0) {
dtd.resolve();
} else {
dtd.reject();
}
return dtd;
}
$.when(appendHtml(dtd))
.done(function() {
$pageslide.find('.nano').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true });
if(settings.loadComplete)settings.loadComplete.call(this, $pageslide, $element);
})
.fail(function() {});
} else {
// Load a URL. Into an iframe?
if(settings.iframe) {
window.console.log("iFrame");
var iframe = $('<iframe id="pageslide_iframe" />').attr({
src: settings.href,
frameborder: 0,
hspace: 0
})
.css({
width: "100%",
height: "100%"
});
$pageslide.find('.content').css('overflow', 'hidden').html(iframe).show();
if(settings.loadComplete)settings.loadComplete.call(this, $pageslide, $element);
} else {
window.console.log("Load");
$pageslide.find('.content').load(settings.href, function(response, status, xhr){
if(status == 'success') {
$pageslide.show();
if(settings.loadComplete)settings.loadComplete.call(this, $pageslide, $element);
$pageslide.find('.nano').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true });
} else {
var msg = '<div style="text-align: center;"><i class="icons-warning" style="font-size: 5em;"></i><h4>Oops!</h4>System may be wrong<br/> or please try again later</div>'
$pageslide.find('.content').html(msg);
}
});
}
$pageslide.data( 'localEl', false );
}
if($pageslide.find('.error-cover').length) $pageslide.find('.error-cover').remove();
_checkTitle(settings);
}
// Function that controls opening of the pageslide
function _start(settings) {
var slideWidth = $pageslide.outerWidth(true),
bodyMove = $sidebarState && !$('.item-groups').length ? slideWidth - 241 : settings.direction == 'right' ? slideWidth - 61 : slideWidth,
bodyAnimateIn = {},
bottomnavAnimateIn = {},
slideAnimateIn = {};
// If the slide is open or opening, just ignore the call
if($pageslide.is(':visible') || _sliding) return;
_sliding = true;
switch(settings.direction) {
case 'left':
$pageslide.css({left: 'auto', right: '-' + slideWidth + 'px'});
bodyAnimateIn['padding-right'] = '+=' + bodyMove;
slideAnimateIn['right'] = '+=' + slideWidth;
break;
default:
$pageslide.css({left: '-' + slideWidth + 'px', right: 'auto'});
bodyAnimateIn['margin-left'] = '+=' + bodyMove;
bottomnavAnimateIn['left'] = '+=' + bodyMove;
if($(window).width() <= 1440 && slideWidth > 963 ) {
bodyAnimateIn['width'] = $body.width();
}
slideAnimateIn['left'] = '+=' + slideWidth;
break;
}
// Animate the slide, and attach this slide's settings to the element
$body.animate(bodyAnimateIn, settings.speed);
$bottomNav.animate(bottomnavAnimateIn, settings.speed);
$pageslide.show().animate(slideAnimateIn, settings.speed, function() {
_sliding = false;
if(typeof settings.openFn === "function") {
settings.openFn.call(this, $pageslide, $element);
};
});
}
$.fn.pageslide = function(options) {
var $elements = this;
// On click
$elements.click( function(e) {
var $self = $(this),
settings = $.extend({href: $self.attr('href'), pageTitle: $self.data('title')}, options);
$element = $self;
// Prevent the default behavior and stop propagation
e.preventDefault();
e.stopPropagation();
if ($pageslide.is(':visible') && $self[0] == _lastCaller) {
// If we clicked the same element twice, toggle closed
$.pageslide.close();
} else {
// Open
$.pageslide(settings);
// Record the last element to trigger pageslide
_lastCaller = $self[0];
}
});
};
/*
* Default settings
*/
$.fn.pageslide.defaults = {
speed: 300, // Accepts standard jQuery effects speeds (i.e. fast, normal or milliseconds)
direction: 'right', // Accepts 'left' or 'right'
modal: false, // If set to true, you must explicitly close pageslide using $.pageslide.close();
iframe: false, // By default, linked pages are loaded into an iframe. Set this to false if you don't want an iframe.
href: null, // Override the source of the content. Optional in most cases, but required when opening pageslide programmatically.
W: 264,
closeFn : null,
openFn : null,
loadComplete : null,
pageTitle: '',
};
/*
* Public methods
*/
// Open the pageslide
$.pageslide = function(options) {
// Extend the settings with those the user has provided
var settings = $.extend({}, $.fn.pageslide.defaults, options),
pageCss = {},
convertToFunction = function(fn){
var x = new Function();
x = fn;
return x;
};
pageCss['width'] = settings.W;
pageCss['margin-left'] = $sidebarState && !$('.item-groups').length ? 241 : settings.direction == 'right' ? 61 : 0;
// Change Object to Function
if(settings.openFn) {
$.fn.pageslide.defaults.openFn = convertToFunction(settings.openFn);
};
if(settings.closeFn) {
$.fn.pageslide.defaults.closeFn = convertToFunction(settings.closeFn);
};
if(settings.loadComplete) {
$.fn.pageslide.defaults.loadComplete = convertToFunction(settings.loadComplete);
};
// Are we trying to open in different direction?
if(($pageslide.is(':visible') && $pageslide.data('W') != settings.W) || ($pageslide.is(':visible') && $pageslide.data('direction') != settings.direction)) {
$.pageslide.close(function(){
$pageslide.css(pageCss);
_checkTitle(settings)
_load(settings);
_start(settings);
});
} else {
_checkTitle(settings)
_load(settings);
if($pageslide.is(':hidden')) {
$pageslide.css(pageCss);
_start(settings);
}
}
$pageslide.data(settings);
}
// Close the pageslide
$.pageslide.close = function(callback) {
var $pageslide = $('#pageslide'),
slideWidth = $pageslide.outerWidth(true),
bodyMove = $sidebarState && !$('.item-groups').length ? slideWidth - 241 : $.fn.pageslide.defaults.direction == 'right' ? slideWidth - 61 : slideWidth
speed = $pageslide.data('speed'),
bodyAnimateIn = {},
bottomnavAnimateIn = {},
slideAnimateIn = {};
// If the slide isn't open, just ignore the call
if( $pageslide.is(':hidden') || _sliding ) return;
_sliding = true;
switch($pageslide.data('direction')) {
case 'left':
bodyAnimateIn['padding-right'] = '-=' + bodyMove;
slideAnimateIn['right'] = '-=' + slideWidth;
break;
default:
bodyAnimateIn['margin-left'] = '-=' + bodyMove;
bottomnavAnimateIn['left'] = '-=' + bodyMove;
slideAnimateIn['left'] = '-=' + slideWidth;
break;
}
$pageslide.animate(slideAnimateIn, speed);
$bottomNav.animate(bottomnavAnimateIn, speed);
$body.animate(bodyAnimateIn, speed, function() {
if($pageslide.data('href') == '#') {
$pageslide.attr('style', '')
.hide()
.find('.content')
.attr('style', '')
.end()
.find('.view-page')
.attr('style', '')
.end()
.find('.pane')
.remove()
.end()
.find('.page-title')
.attr('style', '')
.children('span');
} else {
$pageslide.attr('style', '')
.hide()
.find('.content')
.attr('style', '')
.empty()
.end()
.find('.view-page')
.attr('style', '')
.end()
.find('.pane')
.remove()
.end()
.find('.page-title')
.attr('style', '')
.children('span')
.empty();
}
_sliding = false;
if($pageslide.find('.error-cover').length) $pageslide.find('.error-cover').remove();
if(typeof callback != 'undefined') callback();
if(typeof $.fn.pageslide.defaults.closeFn === "function") {
$.fn.pageslide.defaults.closeFn.call(this, $pageslide, $element);
};
});
}
// Close Callback
$.pageslide.closeCallback = function( callback ) {
if(typeof callback === "function"){
$.fn.pageslide.defaults.closeFn = callback;
};
};
// Open Callback
$.pageslide.openCallback = function( callback ) {
if(typeof callback === "function"){
$.fn.pageslide.defaults.openFn = callback;
};
};
//data load complete callback
$.pageslide.loadComplete = function( callback ) {
if(typeof callback === "function"){
$.fn.pageslide.defaults.loadComplete = callback;
};
};
/* Events */
// Don't let clicks to the pageslide close the window
$pageslide.click(function(e) {
e.stopPropagation();
});
// Close the pageslide if the document is clicked or the users presses the ESC key, unless the pageslide is modal
$(document).bind('click keyup', function(e) {
// If this is a keyup event, let's see if it's an ESC key
if( e.type == "keyup" && e.keyCode != 27) return;
// Make sure it's visible, and we're not modal
if( $pageslide.is( ':visible' ) && !$pageslide.data( 'modal' ) ) {
$.pageslide.close();
}
});
}(window.jQuery);
function setForm(data) {
$.each(data, function(key, value) {
$("#pageslide form #" + key).val(value);
});
}
function resetForm() {
$("#pageslide form").find("input[type=text], input[type=number], textarea")
.val("")
.end()
.find("select")
.prop('selectedIndex', 0)
.end()
.find("input[type=checkbox]")
.prop('checked', false)
.end()
.find("input[type=radio]")
.prop('checked', false);
}
-2
View File
@@ -197,7 +197,6 @@ function mergerTags() {
}
$(function() {
if($('.default-tags').length) {
// checkTagsQuantity();
checkedLength();
$('#tags-merger').on('hidden', function () {
$(this).find('.filter-item').remove();
@@ -205,5 +204,4 @@ $(function() {
} else {
checkedLength();
};
// addTagsTab();
});
+16
View File
@@ -0,0 +1,16 @@
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require lib/jquery.preload.min.js
//= require cycle2
//= require mobile/jquery.mu.image.resize
//= require mobile/orbit.mobile
//= require mobile/jquery.mobile-1.2.0.min
//= require mobile/jquery.swipeplanes-1.2.min
//= require mobile/add2home
//= require mobile/gmAPI
//= require mobile/jquery.ui.map
+350
View File
@@ -0,0 +1,350 @@
/*!
* Add to Homescreen v2.0.4 ~ Copyright (c) 2012 Matteo Spinelli, http://cubiq.org
* Released under MIT license, http://cubiq.org/license
*/
var addToHome = (function (w) {
var nav = w.navigator,
isIDevice = 'platform' in nav && (/iphone|ipod|ipad/gi).test(nav.platform),
isIPad,
isRetina,
isSafari,
isStandalone,
OSVersion,
startX = 0,
startY = 0,
lastVisit = 0,
isExpired,
isSessionActive,
isReturningVisitor,
balloon,
overrideChecks,
positionInterval,
closeTimeout,
options = {
autostart: true, // Automatically open the balloon
returningVisitor: false, // Show the balloon to returning visitors only (setting this to true is HIGHLY RECCOMENDED)
animationIn: 'bubble', // drop || bubble || fade
animationOut: 'drop', // drop || bubble || fade
startDelay: 2000, // 2 seconds from page load before the balloon appears
lifespan: 10000, // 15 seconds before it is automatically destroyed
bottomOffset: 14, // Distance of the balloon from bottom
expire: 0, // Minutes to wait before showing the popup again (0 = always displayed)
message: '', // Customize your message or force a language ('' = automatic)
touchIcon: true, // Display the touch icon
arrow: true, // Display the balloon arrow
hookOnLoad: true, // Should we hook to onload event? (really advanced usage)
iterations: 100 // Internal/debug use
},
intl = {
ca_es: 'Per instal·lar aquesta aplicació al vostre %device premeu %icon i llavors <strong>Afegir a pantalla d\'inici</strong>.',
cs_cz: 'Pro instalaci aplikace na Váš %device, stiskněte %icon a v nabídce <strong>Přidat na plochu</strong>.',
da_dk: 'Tilføj denne side til din %device: tryk på %icon og derefter <strong>Føj til hjemmeskærm</strong>.',
de_de: 'Installieren Sie diese App auf Ihrem %device: %icon antippen und dann <strong>Zum Home-Bildschirm</strong>.',
el_gr: 'Εγκαταστήσετε αυτήν την Εφαρμογή στήν συσκευή σας %device: %icon μετά πατάτε <strong>Προσθήκη σε Αφετηρία</strong>.',
en_us: 'Install this web app on your %device: tap %icon and then <strong>Add to Home Screen</strong>.',
es_es: 'Para instalar esta app en su %device, pulse %icon y seleccione <strong>Añadir a pantalla de inicio</strong>.',
fi_fi: 'Asenna tämä web-sovellus laitteeseesi %device: paina %icon ja sen jälkeen valitse <strong>Lisää Koti-valikkoon</strong>.',
fr_fr: 'Ajoutez cette application sur votre %device en cliquant sur %icon, puis <strong>Ajouter à l\'écran d\'accueil</strong>.',
he_il: '<span dir="rtl">התקן אפליקציה זו על ה-%device שלך: הקש %icon ואז <strong>הוסף למסך הבית</strong>.</span>',
hr_hr: 'Instaliraj ovu aplikaciju na svoj %device: klikni na %icon i odaberi <strong>Dodaj u početni zaslon</strong>.',
hu_hu: 'Telepítse ezt a web-alkalmazást az Ön %device-jára: nyomjon a %icon-ra majd a <strong>Főképernyőhöz adás</strong> gombra.',
it_it: 'Installa questa applicazione sul tuo %device: premi su %icon e poi <strong>Aggiungi a Home</strong>.',
ja_jp: 'このウェブアプリをあなたの%deviceにインストールするには%iconをタップして<strong>ホーム画面に追加</strong>を選んでください。',
ko_kr: '%device에 웹앱을 설치하려면 %icon을 터치 후 "홈화면에 추가"를 선택하세요',
nb_no: 'Installer denne appen på din %device: trykk på %icon og deretter <strong>Legg til på Hjem-skjerm</strong>',
nl_nl: 'Installeer deze webapp op uw %device: tik %icon en dan <strong>Zet in beginscherm</strong>.',
pl_pl: 'Aby zainstalować tę aplikacje na %device: naciśnij %icon a następnie <strong>Dodaj jako ikonę</strong>.',
pt_br: 'Instale este web app em seu %device: aperte %icon e selecione <strong>Adicionar à Tela Inicio</strong>.',
pt_pt: 'Para instalar esta aplicação no seu %device, prima o %icon e depois o <strong>Adicionar ao ecrã principal</strong>.',
ru_ru: 'Установите это веб-приложение на ваш %device: нажмите %icon, затем <strong>Добавить в «Домой»</strong>.',
sv_se: 'Lägg till denna webbapplikation på din %device: tryck på %icon och därefter <strong>Lägg till på hemskärmen</strong>.',
th_th: 'ติดตั้งเว็บแอพฯ นี้บน %device ของคุณ: แตะ %icon และ <strong>เพิ่มที่หน้าจอโฮม</strong>',
tr_tr: '%device için bu uygulamayı kurduktan sonra %icon simgesine dokunarak <strong>Ana Ekrana Ekle</strong>yin.',
zh_cn: '您可以将此应用程式安装到您的 %device 上。请按 %icon 然后点选<strong>添加至主屏幕</strong>。',
zh_tw: '您可以將此應用程式安裝到您的 %device 上。請按 %icon 然後點選<strong>加入主畫面螢幕</strong>。'
};
function init () {
// Preliminary check, all further checks are performed on iDevices only
if ( !isIDevice ) return;
var now = Date.now(),
i;
// Merge local with global options
if ( w.addToHomeConfig ) {
for ( i in w.addToHomeConfig ) {
options[i] = w.addToHomeConfig[i];
}
}
if ( !options.autostart ) options.hookOnLoad = false;
isIPad = (/ipad/gi).test(nav.platform);
isRetina = w.devicePixelRatio && w.devicePixelRatio > 1;
isSafari = (/Safari/i).test(nav.appVersion) && !(/CriOS/i).test(nav.appVersion);
isStandalone = nav.standalone;
OSVersion = nav.appVersion.match(/OS (\d+_\d+)/i);
OSVersion = OSVersion[1] ? +OSVersion[1].replace('_', '.') : 0;
lastVisit = +w.localStorage.getItem('addToHome');
isSessionActive = w.sessionStorage.getItem('addToHomeSession');
isReturningVisitor = options.returningVisitor ? lastVisit && lastVisit + 28*24*60*60*1000 > now : true;
if ( !lastVisit ) lastVisit = now;
// If it is expired we need to reissue a new balloon
isExpired = isReturningVisitor && lastVisit <= now;
if ( options.hookOnLoad ) w.addEventListener('load', loaded, false);
else if ( !options.hookOnLoad && options.autostart ) loaded();
}
function loaded () {
w.removeEventListener('load', loaded, false);
if ( !isReturningVisitor ) w.localStorage.setItem('addToHome', Date.now());
else if ( options.expire && isExpired ) w.localStorage.setItem('addToHome', Date.now() + options.expire * 60000);
if ( !overrideChecks && ( !isSafari || !isExpired || isSessionActive || isStandalone || !isReturningVisitor ) ) return;
var icons = options.touchIcon ? document.querySelectorAll('head link[rel=apple-touch-icon],head link[rel=apple-touch-icon-precomposed]') : [],
sizes,
touchIcon = '',
closeButton,
platform = nav.platform.split(' ')[0],
language = nav.language.replace('-', '_'),
i, l;
balloon = document.createElement('div');
balloon.id = 'addToHomeScreen';
balloon.style.cssText += 'left:-9999px;-webkit-transition-property:-webkit-transform,opacity;-webkit-transition-duration:0;-webkit-transform:translate3d(0,0,0);position:' + (OSVersion < 5 ? 'absolute' : 'fixed');
// Localize message
if ( options.message in intl ) { // You may force a language despite the user's locale
language = options.message;
options.message = '';
}
if ( options.message === '' ) { // We look for a suitable language (defaulted to en_us)
options.message = language in intl ? intl[language] : intl['en_us'];
}
// Search for the apple-touch-icon
if ( icons.length ) {
for ( i = 0, l = icons.length; i < l; i++ ) {
sizes = icons[i].getAttribute('sizes');
if ( sizes ) {
if ( isRetina && sizes == '114x114' ) {
touchIcon = icons[i].href;
break;
}
} else {
touchIcon = icons[i].href;
}
}
touchIcon = '<span style="background-image:url(' + touchIcon + ')" class="addToHomeTouchIcon"></span>';
}
balloon.className = (isIPad ? 'addToHomeIpad' : 'addToHomeIphone') + (touchIcon ? ' addToHomeWide' : '');
balloon.innerHTML = touchIcon +
options.message.replace('%device', platform).replace('%icon', OSVersion >= 4.2 ? '<span class="addToHomeShare"></span>' : '<span class="addToHomePlus">+</span>') +
(options.arrow ? '<span class="addToHomeArrow"></span>' : '') +
'<span class="addToHomeClose">\u00D7</span>';
document.body.appendChild(balloon);
// Add the close action
closeButton = balloon.querySelector('.addToHomeClose');
if ( closeButton ) closeButton.addEventListener('click', clicked, false);
if ( !isIPad && OSVersion >= 6 ) window.addEventListener('orientationchange', orientationCheck, false);
setTimeout(show, options.startDelay);
}
function show () {
var duration,
iPadXShift = 208;
// Set the initial position
if ( isIPad ) {
if ( OSVersion < 5 ) {
startY = w.scrollY;
startX = w.scrollX;
} else if ( OSVersion < 6 ) {
iPadXShift = 160;
}
balloon.style.top = startY + options.bottomOffset + 'px';
balloon.style.left = startX + iPadXShift - Math.round(balloon.offsetWidth / 2) + 'px';
switch ( options.animationIn ) {
case 'drop':
duration = '0.6s';
balloon.style.webkitTransform = 'translate3d(0,' + -(w.scrollY + options.bottomOffset + balloon.offsetHeight) + 'px,0)';
break;
case 'bubble':
duration = '0.6s';
balloon.style.opacity = '0';
balloon.style.webkitTransform = 'translate3d(0,' + (startY + 50) + 'px,0)';
break;
default:
duration = '1s';
balloon.style.opacity = '0';
}
} else {
startY = w.innerHeight + w.scrollY;
if ( OSVersion < 5 ) {
startX = Math.round((w.innerWidth - balloon.offsetWidth) / 2) + w.scrollX;
balloon.style.left = startX + 'px';
balloon.style.top = startY - balloon.offsetHeight - options.bottomOffset + 'px';
} else {
balloon.style.left = '50%';
balloon.style.marginLeft = -Math.round(balloon.offsetWidth / 2) - ( w.orientation%180 && OSVersion >= 6 ? 40 : 0 ) + 'px';
balloon.style.bottom = options.bottomOffset + 'px';
}
switch (options.animationIn) {
case 'drop':
duration = '1s';
balloon.style.webkitTransform = 'translate3d(0,' + -(startY + options.bottomOffset) + 'px,0)';
break;
case 'bubble':
duration = '0.6s';
balloon.style.webkitTransform = 'translate3d(0,' + (balloon.offsetHeight + options.bottomOffset + 50) + 'px,0)';
break;
default:
duration = '1s';
balloon.style.opacity = '0';
}
}
balloon.offsetHeight; // repaint trick
balloon.style.webkitTransitionDuration = duration;
balloon.style.opacity = '1';
balloon.style.webkitTransform = 'translate3d(0,0,0)';
balloon.addEventListener('webkitTransitionEnd', transitionEnd, false);
closeTimeout = setTimeout(close, options.lifespan);
}
function manualShow (override) {
if ( !isIDevice || balloon ) return;
overrideChecks = override;
loaded();
}
function close () {
clearInterval( positionInterval );
clearTimeout( closeTimeout );
closeTimeout = null;
var posY = 0,
posX = 0,
opacity = '1',
duration = '0',
closeButton = balloon.querySelector('.addToHomeClose');
if ( closeButton ) closeButton.removeEventListener('click', close, false);
if ( !isIPad && OSVersion >= 6 ) window.removeEventListener('orientationchange', orientationCheck, false);
if ( OSVersion < 5 ) {
posY = isIPad ? w.scrollY - startY : w.scrollY + w.innerHeight - startY;
posX = isIPad ? w.scrollX - startX : w.scrollX + Math.round((w.innerWidth - balloon.offsetWidth)/2) - startX;
}
balloon.style.webkitTransitionProperty = '-webkit-transform,opacity';
switch ( options.animationOut ) {
case 'drop':
if ( isIPad ) {
duration = '0.4s';
opacity = '0';
posY = posY + 50;
} else {
duration = '0.6s';
posY = posY + balloon.offsetHeight + options.bottomOffset + 50;
}
break;
case 'bubble':
if ( isIPad ) {
duration = '0.8s';
posY = posY - balloon.offsetHeight - options.bottomOffset - 50;
} else {
duration = '0.4s';
opacity = '0';
posY = posY - 50;
}
break;
default:
duration = '0.8s';
opacity = '0';
}
balloon.addEventListener('webkitTransitionEnd', transitionEnd, false);
balloon.style.opacity = opacity;
balloon.style.webkitTransitionDuration = duration;
balloon.style.webkitTransform = 'translate3d(' + posX + 'px,' + posY + 'px,0)';
}
function clicked () {
w.sessionStorage.setItem('addToHomeSession', '1');
isSessionActive = true;
close();
}
function transitionEnd () {
balloon.removeEventListener('webkitTransitionEnd', transitionEnd, false);
balloon.style.webkitTransitionProperty = '-webkit-transform';
balloon.style.webkitTransitionDuration = '0.2s';
// We reached the end!
if ( !closeTimeout ) {
balloon.parentNode.removeChild(balloon);
balloon = null;
return;
}
// On iOS 4 we start checking the element position
if ( OSVersion < 5 && closeTimeout ) positionInterval = setInterval(setPosition, options.iterations);
}
function setPosition () {
var matrix = new WebKitCSSMatrix(w.getComputedStyle(balloon, null).webkitTransform),
posY = isIPad ? w.scrollY - startY : w.scrollY + w.innerHeight - startY,
posX = isIPad ? w.scrollX - startX : w.scrollX + Math.round((w.innerWidth - balloon.offsetWidth) / 2) - startX;
// Screen didn't move
if ( posY == matrix.m42 && posX == matrix.m41 ) return;
balloon.style.webkitTransform = 'translate3d(' + posX + 'px,' + posY + 'px,0)';
}
// Clear local and session storages (this is useful primarily in development)
function reset () {
w.localStorage.removeItem('addToHome');
w.sessionStorage.removeItem('addToHomeSession');
}
function orientationCheck () {
balloon.style.marginLeft = -Math.round(balloon.offsetWidth / 2) - ( w.orientation%180 && OSVersion >= 6 ? 40 : 0 ) + 'px';
}
// Bootstrap!
init();
return {
show: manualShow,
close: close,
reset: reset
};
})(window);
+34
View File
@@ -0,0 +1,34 @@
String.prototype.format = function() { a = this; for ( k in arguments ) { a = a.replace("{" + k + "}", arguments[k]); } return a; };
window.gmAPI = {
'version': '3.0-rc1',
'ga': '',
'primaryUrl': 'http://code.google.com/p/jquery-ui-map/',
'url': 'http://jquery-ui-map.googlecode.com/',
'forum': 'http://groups.google.com/group/jquery-ui-map-discuss/feed/rss_v2_0_msgs.xml',
'subscribe': 'http://groups.google.com/group/jquery-ui-map-discuss/boxsubscribe',
'exception': 'Unable to load due to either poor internet connection or some CDN\'s aren\'t as responsive as we would like them to be. Try refreshing the page :D.',
'init': function() {
//window._gaq = [['_setAccount', this.ga], ['_trackPageview'], ['_trackPageLoadTime']];
//Modernizr.load({ 'test': ( location.href.indexOf(this.url) > -1 ), 'yep': 'http://www.google-analytics.com/ga.js' });
this.test('Backbone', function() {
$('#forum').append('<h2>Forum</h2><ul id="forum_posts"></ul><h2>Subscribe</h2><form id="forum_subscribe" class="subscribe" action="#"><label for="email">E-mail:</label><input id="email" type="text" name="email" /><input type="submit" name="sub" value="Subscribe" /></form>');
ForumCollection = Backbone.Collection.extend({ 'url': 'http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&callback=?&q={0}'.format(encodeURIComponent(gmAPI.forum)), 'parse': function(response) { return response.responseData.feed.entries; } });
ForumPost = Backbone.View.extend({ 'tagName': 'li', 'className': 'group-item', 'template': _.template('<a href="<%=link%>"><%=title%></a></h3>'), 'render': function() { $(this.el).html(this.template(this.model.toJSON())); return this; } });
Forum = Backbone.View.extend({ 'el': $("#forum"), 'initialize': function() { this.col = new ForumCollection(); this.col.bind('reset', this.load, this); this.col.fetch(); }, 'add': function(post) { var view = new ForumPost({'model': post}); $('#forum_posts').append(view.render().el); }, 'load': function () { this.col.each(this.add); $('#forum_subscribe').attr('action', gmAPI.subscribe); $(this.el).show(); } });
var app = new Forum();
});
this.test('prettyPrint', function() { prettyPrint(); });
$('#version').text(this.version);
},
'redirect': function(url) { alert('This page is deprecated. Please update your URL. Redirecting to new page.'); window.location = url; },
'col': [],
'tests': [],
'test': function(a, b) { if ( window[a] ) { b(); } },
'add': function(a, b) { if (b) { this.col[a] = b; } else { this.col.push(a); } return this; },
'load': function(a) { var self = this; if (a) { self.col[a](); } else { $.each(self.col, function(i,d) { try { d(); } catch (err) { alert(self.exception); } }); } },
'timeStart': function(key, desc) { this.tests[key] = { 'start': new Date().getTime(), 'desc': desc }; },
'timeEnd': function(key) { this.tests[key].elapsed = new Date().getTime(); },
'report': function(id) { var i = 1; for ( var k in this.tests ) { var t = this.tests[k]; $(id).append('<div class="benchmark rounded"><div class="benchmark-result lt">' + (t.elapsed - t.start) + ' ms</div><div class="lt"><p class="benchmark-iteration">Benchmark case ' + i + '</p><p class="benchmark-title">' + t.desc + '</p></div></div>'); i++; }; }
};
gmAPI.init();
@@ -0,0 +1,2 @@
/*! jQuery Mobile vGit Build: SHA1: b49cc06499abf8f987cf90f35349cfac0918c939 <> Date: Tue Oct 2 11:22:34 2012 -0700 jquerymobile.com | jquery.org/license !*/
(function(a,b,c){typeof define=="function"&&define.amd?define(["jquery"],function(d){return c(d,a,b),d.mobile}):c(a.jQuery,a,b)})(this,document,function(a,b,c,d){(function(a,b,d){var e={};a.mobile=a.extend({},{version:"1.2.0",ns:"",subPageUrlKey:"ui-page",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",focusClass:"ui-focus",ajaxEnabled:!0,hashListeningEnabled:!0,linkBindingEnabled:!0,defaultPageTransition:"fade",maxTransitionWidth:!1,minScrollBack:250,touchOverflowEnabled:!1,defaultDialogTransition:"pop",pageLoadErrorMessage:"Error Loading Page",pageLoadErrorMessageTheme:"e",phonegapNavigationEnabled:!1,autoInitializePage:!0,pushStateEnabled:!0,ignoreContentEnabled:!1,orientationChangeEnabled:!0,buttonMarkup:{hoverDelay:200},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},silentScroll:function(d){a.type(d)!=="number"&&(d=a.mobile.defaultHomeScroll),a.event.special.scrollstart.enabled=!1,setTimeout(function(){b.scrollTo(0,d),a(c).trigger("silentscroll",{x:0,y:d})},20),setTimeout(function(){a.event.special.scrollstart.enabled=!0},150)},nsNormalizeDict:e,nsNormalize:function(b){if(!b)return;return e[b]||(e[b]=a.camelCase(a.mobile.ns+b))},getInheritedTheme:function(a,b){var c=a[0],d="",e=/ui-(bar|body|overlay)-([a-z])\b/,f,g;while(c){f=c.className||"";if(f&&(g=e.exec(f))&&(d=g[2]))break;c=c.parentNode}return d||b||"a"},closestPageData:function(a){return a.closest(':jqmData(role="page"), :jqmData(role="dialog")').data("page")},enhanceable:function(a){return this.haveParents(a,"enhance")},hijackable:function(a){return this.haveParents(a,"ajax")},haveParents:function(b,c){if(!a.mobile.ignoreContentEnabled)return b;var d=b.length,e=a(),f,g,h;for(var i=0;i<d;i++){g=b.eq(i),h=!1,f=b[i];while(f){var j=f.getAttribute?f.getAttribute("data-"+a.mobile.ns+c):"";if(j==="false"){h=!0;break}f=f.parentNode}h||(e=e.add(g))}return e},getScreenHeight:function(){return b.innerHeight||a(b).height()}},a.mobile),a.fn.jqmData=function(b,c){var e;return typeof b!="undefined"&&(b&&(b=a.mobile.nsNormalize(b)),arguments.length<2||c===d?e=this.data(b):e=this.data(b,c)),e},a.jqmData=function(b,c,d){var e;return typeof c!="undefined"&&(e=a.data(b,c?a.mobile.nsNormalize(c):c,d)),e},a.fn.jqmRemoveData=function(b){return this.removeData(a.mobile.nsNormalize(b))},a.jqmRemoveData=function(b,c){return a.removeData(b,a.mobile.nsNormalize(c))},a.fn.removeWithDependents=function(){a.removeWithDependents(this)},a.removeWithDependents=function(b){var c=a(b);(c.jqmData("dependents")||a()).remove(),c.remove()},a.fn.addDependents=function(b){a.addDependents(a(this),b)},a.addDependents=function(b,c){var d=a(b).jqmData("dependents")||a();a(b).jqmData("dependents",a.merge(d,c))},a.fn.getEncodedText=function(){return a("<div/>").text(a(this).text()).html()},a.fn.jqmEnhanceable=function(){return a.mobile.enhanceable(this)},a.fn.jqmHijackable=function(){return a.mobile.hijackable(this)};var f=a.find,g=/:jqmData\(([^)]*)\)/g;a.find=function(b,c,d,e){return b=b.replace(g,"[data-"+(a.mobile.ns||"")+"$1]"),f.call(this,b,c,d,e)},a.extend(a.find,f),a.find.matches=function(b,c){return a.find(b,null,null,c)},a.find.matchesSelector=function(b,c){return a.find(c,null,null,[b]).length>0}})(a,this),function(a,b){var c=0,d=Array.prototype.slice,e=a.cleanData;a.cleanData=function(b){for(var c=0,d;(d=b[c])!=null;c++)try{a(d).triggerHandler("remove")}catch(f){}e(b)},a.widget=function(b,c,d){var e,f,g,h,i=b.split(".")[0];b=b.split(".")[1],e=i+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e]=function(b){return!!a.data(b,e)},a[i]=a[i]||{},f=a[i][b],g=a[i][b]=function(a,b){if(!this._createWidget)return new g(a,b);arguments.length&&this._createWidget(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,e){a.isFunction(e)&&(d[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},d=function(a){return c.prototype[b].apply(this,a)};return function(){var b=this._super,c=this._superApply,f;return this._super=a,this._superApply=d,f=e.apply(this,arguments),this._super=b,this._superApply=c,f}}())}),g.prototype=a.widget.extend(h,{widgetEventPrefix:b},d,{constructor:g,namespace:i,widgetName:b,widgetBaseClass:e,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g)},a.widget.extend=function(c){var e=d.call(arguments,1),f=0,g=e.length,h,i;for(;f<g;f++)for(h in e[f])i=e[f][h],e[f].hasOwnProperty(h)&&i!==b&&(c[h]=a.isPlainObject(i)?a.widget.extend({},c[h],i):i);return c},a.widget.bridge=fuLine truncated
@@ -6,7 +6,7 @@
wrap_fix:true // Let image display like in-line.
};
var _set = $.extend(_defaultSettings, params);
// var isIE7 = $.browser.msie && (7 == ~~ $.browser.version);
var isIE7 = $.browser.msie && (7 == ~~ $.browser.version);
//var anyDynamicSource = $(this).attr("src");
//$(this).attr("src",anyDynamicSource+ "?" + new Date().getTime());
@@ -21,7 +21,7 @@
var ow, oh;
//[workaround] - msie need get width early
if (/MSIE/g.test($ua))
if ($.browser.msie)
{
// Get original size for calcutation.
ow = this.width;
@@ -34,7 +34,7 @@
});
}
if (!/MSIE/g.test($ua))
if (!$.browser.msie)
{
// Get original size for calcutation.
ow = this.width;
@@ -128,7 +128,7 @@
sh += osh;
$(this).css(sh_margin_type, sh+'px');
// $(this).css('position','absolute');
$(this).css('position','absolute');
}
$(this).fadeIn('slow');
})
@@ -138,7 +138,7 @@
.each(function() {
$(this).hide();
// Trigger load event (for Gecko and MSIE)
if ( this.complete || /MSIE/g.test($ua) ) {
if ( this.complete || $.browser.msie ) {
$( this ).trigger( "load" ).trigger( "error" );
}
});
@@ -0,0 +1,242 @@
//SwipePlanes v1.2 jQuery Plugin by REMD
$.fn.swipePlanes = function(opciones){
return this.each(function(){
var randId = Math.round(100*Math.random()); ////IDENTIFICADOR ALEATORIO DE LA INSTANCIA//////////
//EL VISOR /////////////////////////////////////
this.onselectstart = function(){return false;};
this.unselectable = "on";
$(this).css('-moz-user-select', 'none');
$(this).css('-webkit-user-select', 'none');
$(this).css('overflow','hidden');
if($(this).css('position') != 'absolute')$(this).css('position','relative');
var anchoVisor = $(this).width();
var altoVisor = $(this).height;
var divVisor = this;
//El CONTENEDOR /////////////////////////////////////
var divContenedor;
var pagActual = 0;
divContenedor = $(this).children('div:first');
divContenedor.css('transition','none');
divContenedor.css('-moz-user-select', 'none');
divContenedor.css('-webkit-user-select', 'none');
divContenedor.css('position','relative');
divContenedor.css('left','0px');
//LAS PAGINAS /////////////////////////////////////////
var divPaginas;
var bufferPaginas = 0;
var metaPaginas = 0;
var metaPagNum = 0;
divPaginas = divContenedor.children('div,a');
divPaginas.css('display','inline-block');
divPaginas.css('float','left');
divPaginas.css('position','relative');
metaPaginas = new Array();
metaPaginas[0] = 0;
divPaginas.each(function(){
if((bufferPaginas+(this.offsetWidth)) > anchoVisor+metaPaginas[metaPagNum]){
if(bufferPaginas > 0)metaPagNum++;
metaPaginas[metaPagNum] = bufferPaginas;
}
bufferPaginas += (this.offsetWidth + parseInt($(this).css('margin-left'))+parseInt($(this).css('margin-right')));
});
metaPaginas[metaPagNum] -= anchoVisor - (bufferPaginas-metaPaginas[metaPagNum]); //Ajuste �ltimo salto
divContenedor.css('width',bufferPaginas+'px'); //Ajuste Contenedor al tamano de las paginas
generarControles($(this),metaPagNum);
//LOS EVENTOS ////////////////////////////////////////////
var iX = 0,aX = 0,fX = 0; //Manejo de coordenadas
var drag = 0,t = 0,ms = 0,metaEvento,dX = 0; //Manejo del entorno/tiempo
$(this).bind('touchstart',function(event){
clearInterval(t);
if(event.pageX)iX = event.pageX;
if(event.originalEvent.touches)iX = event.originalEvent.touches[0].pageX;
divContenedor.css('transition','none');
drag = 1;
ms = 0;
metaEvento = 'click';
t = setInterval(function(){ms++;},1);
});
$(this).bind('touchmove',function(event){
if(event.pageX)aX = event.pageX;
if(event.originalEvent.touches)aX = event.originalEvent.touches[0].pageX;
dX = Math.abs(aX - iX);
if(dX > 50)event.preventDefault();
if(drag && dX > 50){
divContenedor.css('left',(((metaPaginas[pagActual]*-1)+(aX - iX)))+'px');
}
});
$(this).bind('touchend touchcancel touchleave',function(event){
if(drag && dX > 20){
drag = 0;
console.log(metaPaginas);
dX = Math.abs(fX - iX);
clearInterval(t);
if(event.pageX)fX = event.pageX;
if(event.originalEvent.touches)fX = aX;
if((iX-fX) > 0 && ms < 100 && dX > 50)metaEvento = 'swipeLeft';
if((iX-fX) <= 0 && ms < 100 && dX > 50)metaEvento = 'swipeRight';
if((iX-fX) > 0 && ms > 100 && dX > 50)metaEvento = 'moveLeft';
if((iX-fX) <= 0 && ms > 100 && dX > 50)metaEvento = 'moveRight';
if(dX <= 50)metaEvento = 'click';
switch(metaEvento){
case 'swipeLeft':
if(pagActual < metaPagNum){pagActual++;}
break;
case 'moveLeft':
if(pagActual < metaPagNum && dX > (Math.abs(anchoVisor/2))){pagActual++;}
break;
case 'swipeRight':
if(pagActual > 0){pagActual--;}
break;
case 'moveRight':
if(pagActual > 0 && dX > (Math.abs(anchoVisor/2))){pagActual--;}
break;
}
ms = 0; dX = 0; iX = 0; aX = 0; fX = 0; metaEvento = '';
irPagina(pagActual);
}
});
//EVENTOS CONTROLES /////////////////////////////////////////
$('.'+randId+'swipePlanesMiniPag').click(function(){
pagActual = $(this).attr('mpg');
irPagina();
});
$('.'+randId+'swipePlanesRowLeft').click(function(e){
e.stopPropagation();
e.preventDefault();
if(pagActual > 0)pagActual--;
irPagina();
});
$('.'+randId+'swipePlanesRowRight').click(function(e){
e.preventDefault();
e.stopPropagation();
if(pagActual < metaPagNum)pagActual++;
irPagina();
});
$(this).bind('mousemove',function(){
$('.'+randId+'swipePlanesRowLeft').css('display','block');
$('.'+randId+'swipePlanesRowRight').css('display','block');
$('.'+randId+'swipePlanesRowLeft').css('opacity','1');
$('.'+randId+'swipePlanesRowRight').css('opacity','1');
});
$('.'+randId+'swipePlanesRowLeft').bind('mousemove',function(){
$('.'+randId+'swipePlanesRowLeft').css('opacity','1');
$('.'+randId+'swipePlanesRowRight').css('opacity','1');
});
$('.'+randId+'swipePlanesRowRight').bind('mousemove',function(){
$('.'+randId+'swipePlanesRowLeft').css('opacity','1');
$('.'+randId+'swipePlanesRowRight').css('opacity','1');
});
$(this).mouseout(function(){
$('.'+randId+'swipePlanesRowLeft').css('opacity','0');
$('.'+randId+'swipePlanesRowRight').css('opacity','0');
});
//CONTROLES //////////////////////////////////////////////
function generarControles(divVisor,metaPagNum){
var i = 0;
var miniPaginasHtml = '';
var style = '';
for(i;i <= metaPagNum; i++){
if(!i)style='background:#CECECE';
else style='';
miniPaginasHtml += '<div mpg="'+i+'" style="'+style+'" class="'+randId+'swipePlanesMiniPag"></div>';
}
// <div class="'+randId+'swipePlanesRowLeft"></div><div class="'+randId+'swipePlanesRowRight"></div>
var controlesHtml = '<div class="'+randId+'swipePlanesPaginator">'+miniPaginasHtml+'</div>';
divVisor.append(controlesHtml);
$('.'+randId+'swipePlanesMiniPag').css('display','inline-block');
$('.'+randId+'swipePlanesMiniPag').css('width','7px');
$('.'+randId+'swipePlanesMiniPag').css('height','7px');
$('.'+randId+'swipePlanesMiniPag').css('margin-left','2px');
$('.'+randId+'swipePlanesMiniPag').css('margin-right','2px');
$('.'+randId+'swipePlanesMiniPag').css('border','1px solid #CECECE');
$('.'+randId+'swipePlanesMiniPag').css('border-radius','4px');
$('.'+randId+'swipePlanesMiniPag').css('cursor','pointer');
$('.'+randId+'swipePlanesRowLeft').css('background-image','url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABkCAYAAADE6GNbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKwwAACsMBNCkkqwAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAAWdEVYdENyZWF0aW9uIFRpbWUAMTAvMTkvMTJlCtGpAAABaElEQVR4nO3cS3HEMBRE0atU1oaURTCIwxiSh4NQBNIQcDDEfp/OVF8AKp3yR5IXHsD3GIP/3HmefI4xOI6jey632vedj+5JRGWIWoaoZYhahqhliFqGqGWIWoaoZYhahqhliFqGqGWIWoZENed8RIzTCplzPrZt+4oYqw0SiYAmSDQCGiAZCCiGZCGgEJKJgCJINgIKIBUISIZUISARUomAJEg1AhIgHQgIhnQhIBDSiYAgSDcCAiAKCLgJUUHADYgSAi5C1BBwAaKIAIGPD1H9GbLWer5er5+Mydzp0hVRxFy+tdQwt54RJczth10FE/LWUsCEvX67MaHrSCcmfEHswqSs7B2YtC1KNSZ1r1WJSd80VmFKdr8VmLJtfDam9DySiSk/WGVhWk6IGZi2o240pvXMHolp//iw1npGjNMOicoQtQxRyxC1DFHLELUMUcsQtQxRyxC1DFHLELUMUettIIM3+XXbL64qrlAHZEgkAAAAAElFTkSuQmCC)');
$('.'+randId+'swipePlanesRowLeft').css('position','absolute');
$('.'+randId+'swipePlanesRowLeft').css('width','50px');
$('.'+randId+'swipePlanesRowLeft').css('height','100px');
$('.'+randId+'swipePlanesRowLeft').css('cursor','pointer');
$('.'+randId+'swipePlanesRowLeft').css('left','0px');
$('.'+randId+'swipePlanesRowLeft').css('top',((divVisor.height()/2)-50)+'px');
$('.'+randId+'swipePlanesRowLeft').css('z-index','909');
$('.'+randId+'swipePlanesRowLeft').css('display','none');
$('.'+randId+'swipePlanesRowLeft').css('box-shadow','0 1px 3px rgba(0, 0, 0, 0.3);');
$('.'+randId+'swipePlanesRowRight').css('background-image','url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABkCAYAAADE6GNbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKwwAACsMBNCkkqwAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAAWdEVYdENyZWF0aW9uIFRpbWUAMTAvMTkvMTJlCtGpAAABXklEQVR4nO3cvW2EQBRF4TPWxpTkwDXQw1IS7oEqXBINsKlTM+/nenVPDuKTYOZNwgC+xhj8567r4jHGYN/37meZats2ProfIipD1DJELUPUMkQtQ9QyRC1D1DJELUPUMkQtQ9QyRC1D1DLkd+u6PiPuM1MIZFmWz25M2KvVjQn9Rjox4R97FyZl1erApC2/1ZjUfaQSk74hVmFKdvYKTNmIko0pnbUyMeVDYxamZfrNwLSN8dGY1vNIJKb9YBWFaYdADEYCAvMYGQjMYaQgcB8jB7mbHOQ8z5/jOL7/ep0U5C4ChCAzCBCBzCJAABKBgGZIFAIaIZEIaIJEI6ABkoGAYkgWAgohmQgogmQjoABSgYBkSBUCEiGVCEiCVCMgAdKBgGBIFwICIZ0ICIJ0IyAI0o0AgYNVVIaoZYhahqhliFqGqGWIWoaoZYhahqhliFqGqGWIWm8DGbzJr9teHYWuULzgkDAAAAAASUVORK5CYII=)');
$('.'+randId+'swipePlanesRowRight').css('position','absolute');
$('.'+randId+'swipePlanesRowRight').css('width','50px');
$('.'+randId+'swipePlanesRowRight').css('height','100px');
$('.'+randId+'swipePlanesRowRight').css('cursor','pointer');
$('.'+randId+'swipePlanesRowRight').css('right','0px');
$('.'+randId+'swipePlanesRowRight').css('top',((divVisor.height()/2)-50)+'px');
$('.'+randId+'swipePlanesRowRight').css('z-index','909');
$('.'+randId+'swipePlanesRowRight').css('display','none');
$('.'+randId+'swipePlanesRowRight').css('box-shadow','0 1px 3px rgba(0, 0, 0, 0.3);');
$('.'+randId+'swipePlanesPaginator').css('position','absolute');
$('.'+randId+'swipePlanesPaginator').css('padding','0px 4px');
$('.'+randId+'swipePlanesPaginator').css('top','10px');
$('.'+randId+'swipePlanesPaginator').css('box-shadow','0 1px 3px rgba(0, 0, 0, 0.3);');
$('.'+randId+'swipePlanesPaginator').css('border-radius','4px');
$('.'+randId+'swipePlanesPaginator').css('left',((divVisor.width()/2)-($('.'+randId+'swipePlanesPaginator').width()/2))+'px');
}
function irPagina(){
divContenedor.css('transition','left 500ms');
divContenedor.css('left',((metaPaginas[pagActual])*-1)+'px');
$('.'+randId+'swipePlanesMiniPag').css('background','');
$('.'+randId+'swipePlanesMiniPag[mpg='+pagActual+']').css('background','#CECECE');
}
});
};
+373
View File
@@ -0,0 +1,373 @@
/*!
* jQuery FN Google Map 3.0-rc
* http://code.google.com/p/jquery-ui-map/
* Copyright (c) 2010 - 2012 Johan Säll Larsson
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
( function($) {
/**
* @param name:string
* @param prototype:object
*/
$.a = function(name, prototype) {
var namespace = name.split('.')[0];
name = name.split('.')[1];
$[namespace] = $[namespace] || {};
$[namespace][name] = function(options, element) {
if ( arguments.length ) {
this._setup(options, element);
}
};
$[namespace][name].prototype = $.extend({
'namespace': namespace,
'pluginName': name
}, prototype);
$.fn[name] = function(options) {
var isMethodCall = typeof options === "string",
args = Array.prototype.slice.call(arguments, 1),
returnValue = this;
if ( isMethodCall && options.substring(0, 1) === '_' ) {
return returnValue;
}
this.each(function() {
var instance = $.data(this, name);
if (!instance) {
instance = $.data(this, name, new $[namespace][name](options, this));
}
if (isMethodCall) {
returnValue = instance[options].apply(instance, args);
}
});
return returnValue;
};
};
$.a('ui.gmap', {
/**
* Map options
* @see http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#MapOptions
*/
options: {
mapTypeId: 'roadmap',
zoom: 5
},
/**
* Get or set options
* @param key:string
* @param options:object
* @return object
*/
option: function(key, options) {
if (options) {
this.options[key] = options;
this.get('map').set(key, options);
return this;
}
return this.options[key];
},
/**
* Setup plugin basics,
* @param options:object
* @param element:node
*/
_setup: function(options, element) {
this.el = element;
options = options || {};
jQuery.extend(this.options, options, { 'center': this._latLng(options.center) });
this._create();
if ( this._init ) { this._init(); }
},
/**
* Instanciate the Google Maps object
*/
_create: function() {
var self = this;
this.instance = { 'map': new google.maps.Map(self.el, self.options), 'markers': [], 'overlays': [], 'services': [] };
google.maps.event.addListenerOnce(self.instance.map, 'bounds_changed', function() { $(self.el).trigger('init', self.instance.map); });
self._call(self.options.callback, self.instance.map);
},
/**
* Adds a latitude longitude pair to the bounds.
* @param position:google.maps.LatLng/string
*/
addBounds: function(position) {
var bounds = this.get('bounds', new google.maps.LatLngBounds());
bounds.extend(this._latLng(position));
this.get('map').fitBounds(bounds);
return this;
},
/**
* Helper function to check if a LatLng is within the viewport
* @param marker:google.maps.Marker
*/
inViewport: function(marker) {
var bounds = this.get('map').getBounds();
return (bounds) ? bounds.contains(marker.getPosition()) : false;
},
/**
* Adds a custom control to the map
* @param panel:jquery/node/string
* @param position:google.maps.ControlPosition
* @see http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#ControlPosition
*/
addControl: function(panel, position) {
this.get('map').controls[position].push(this._unwrap(panel));
return this;
},
/**
* Adds a Marker to the map
* @param markerOptions:google.maps.MarkerOptions
* @param callback:function(map:google.maps.Map, marker:google.maps.Marker) (optional)
* @return $(google.maps.Marker)
* @see http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#MarkerOptions
*/
addMarker: function(markerOptions, callback) {
markerOptions.map = this.get('map');
markerOptions.position = this._latLng(markerOptions.position);
var marker = new (markerOptions.marker || google.maps.Marker)(markerOptions);
var markers = this.get('markers');
if ( marker.id ) {
markers[marker.id] = marker;
} else {
markers.push(marker);
}
if ( marker.bounds ) {
this.addBounds(marker.getPosition());
}
this._call(callback, markerOptions.map, marker);
return $(marker);
},
/**
* Clears by type
* @param ctx:string e.g. 'markers', 'overlays', 'services'
*/
clear: function(ctx) {
this._c(this.get(ctx));
this.set(ctx, []);
return this;
},
_c: function(obj) {
for ( var property in obj ) {
if ( obj.hasOwnProperty(property) ) {
if ( obj[property] instanceof google.maps.MVCObject ) {
google.maps.event.clearInstanceListeners(obj[property]);
if ( obj[property].setMap ) {
obj[property].setMap(null);
}
} else if ( obj[property] instanceof Array ) {
this._c(obj[property]);
}
obj[property] = null;
}
}
},
/**
* Returns the objects with a specific property and value, e.g. 'category', 'tags'
* @param ctx:string in what context, e.g. 'markers'
* @param options:object property:string the property to search within, value:string, operator:string (optional) (AND/OR)
* @param callback:function(marker:google.maps.Marker, isFound:boolean)
*/
find: function(ctx, options, callback) {
var obj = this.get(ctx);
options.value = $.isArray(options.value) ? options.value : [options.value];
for ( var property in obj ) {
if ( obj.hasOwnProperty(property) ) {
var isFound = false;
for ( var value in options.value ) {
if ( $.inArray(options.value[value], obj[property][options.property]) > -1 ) {
isFound = true;
} else {
if ( options.operator && options.operator === 'AND' ) {
isFound = false;
break;
}
}
}
callback(obj[property], isFound);
}
}
return this;
},
/**
* Returns an instance property by key. Has the ability to set an object if the property does not exist
* @param key:string
* @param value:object(optional)
*/
get: function(key, value) {
var instance = this.instance;
if ( !instance[key] ) {
if ( key.indexOf('>') > -1 ) {
var e = key.replace(/ /g, '').split('>');
for ( var i = 0; i < e.length; i++ ) {
if ( !instance[e[i]] ) {
if (value) {
instance[e[i]] = ( (i + 1) < e.length ) ? [] : value;
} else {
return null;
}
}
instance = instance[e[i]];
}
return instance;
} else if ( value && !instance[key] ) {
this.set(key, value);
}
}
return instance[key];
},
/**
* Triggers an InfoWindow to open
* @param infoWindowOptions:google.maps.InfoWindowOptions
* @param marker:google.maps.Marker (optional)
* @param callback:function (optional)
* @see http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#InfoWindowOptions
*/
openInfoWindow: function(infoWindowOptions, marker, callback) {
var iw = this.get('iw', infoWindowOptions.infoWindow || new google.maps.InfoWindow);
iw.setOptions(infoWindowOptions);
iw.open(this.get('map'), this._unwrap(marker));
this._call(callback, iw);
return this;
},
/**
* Triggers an InfoWindow to close
*/
closeInfoWindow: function() {
if ( this.get('iw') != null ) {
this.get('iw').close();
}
return this;
},
/**
* Sets an instance property
* @param key:string
* @param value:object
*/
set: function(key, value) {
this.instance[key] = value;
return this;
},
/**
* Refreshes the map
*/
refresh: function() {
var map = this.get('map');
var latLng = map.getCenter();
$(map).triggerEvent('resize');
map.setCenter(latLng);
return this;
},
/**
* Destroys the plugin.
*/
destroy: function() {
this.clear('markers').clear('services').clear('overlays')._c(this.instance);
jQuery.removeData(this.el, this.name);
},
/**
* Helper method for calling a function
* @param callback
*/
_call: function(callback) {
if ( callback && $.isFunction(callback) ) {
callback.apply(this, Array.prototype.slice.call(arguments, 1));
}
},
/**
* Helper method for google.maps.Latlng
* @param latLng:string/google.maps.LatLng
*/
_latLng: function(latLng) {
if ( !latLng ) {
return new google.maps.LatLng(0.0, 0.0);
}
if ( latLng instanceof google.maps.LatLng ) {
return latLng;
} else {
latLng = latLng.replace(/ /g,'').split(',');
return new google.maps.LatLng(latLng[0], latLng[1]);
}
},
/**
* Helper method for unwrapping jQuery/DOM/string elements
* @param obj:string/node/jQuery
*/
_unwrap: function(obj) {
return (!obj) ? null : ( (obj instanceof jQuery) ? obj[0] : ((obj instanceof Object) ? obj : $('#'+obj)[0]) )
}
});
jQuery.fn.extend( {
triggerEvent: function(eventType) {
google.maps.event.trigger(this[0], eventType);
return this;
},
addEventListener: function(eventType, eventDataOrCallback, eventCallback) {
if ( google.maps && this[0] instanceof google.maps.MVCObject ) {
google.maps.event.addListener(this[0], eventType, eventDataOrCallback);
} else {
if (eventCallback) {
this.bind(eventType, eventDataOrCallback, eventCallback);
} else {
this.bind(eventType, eventDataOrCallback);
}
}
return this;
}
/*removeEventListener: function(eventType) {
if ( google.maps && this[0] instanceof google.maps.MVCObject ) {
if (eventType) {
google.maps.event.clearListeners(this[0], eventType);
} else {
google.maps.event.clearInstanceListeners(this[0]);
}
} else {
this.unbind(eventType);
}
return this;
}*/
});
jQuery.each(('click rightclick dblclick mouseover mouseout drag dragend').split(' '), function(i, name) {
jQuery.fn[name] = function(a, b) {
return this.addEventListener(name, a, b);
}
});
} (jQuery) );
@@ -0,0 +1,130 @@
<%#= encoding: utf-8 %>
// function slideshow() {
// var $globalW = $(".global").width(),
// $slideImg = $(".slideImg"),
// $slidebanner = $(".slidebanner"),
// $slideshow = $(".slideshow"),
// $slideImgOW = $slideImg.width(),
// $slideImgOH = $slideImg.height();
// $slideImg.css({
// "widht": $globalW,
// "height": Math.floor(($globalW/$slideImgOW)*$slideImgOH),
// });
// $slideshow.css({
// "width": $globalW,
// "height": Math.floor(($globalW/$slideImgOW)*$slideImgOH),
// });
// alert(Math.floor(($globalW/$slideImgOW)*$slideImgOH))
// }
$('#index').live('pageinit',function(){
var $globalW = $(window).width(),
$slideshow = $(".slideshow");
$slideshow.css({
"width": $globalW, "height": Math.floor($globalW/720*240)
});
$(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)});
$(this).find(".newpic img").muImageResize({width: 280, height: 200});
$('.slideshow').cycle({
fx: $effect,
timeout: $timeout
});
$(".newlist").css({
"width" : $(".newitem").outerWidth()*(Math.floor($globalW/$(".newitem").outerWidth()))+30,
})
// var oc_timer;
// clearTimeout(oc_timer);
// oc_timer = setTimeout(function () {
// $('.newlist').swipePlanes();
// }, 1000);
});
$('#announcement_content').live('pageinit',function(){
$(this).find(".newpic img").muImageResize({width: 320, height: 220});
});
$('#map').live('pageinit', function() {
var mobileDemo = { 'center': $map_center, 'zoom': $map_zoom };
var $windowH = $(window).height();
$("#map_canvas").css({
'height' : $windowH,
})
gmAPI.add('basic_map', function() {
$('#map_canvas').gmap({'center': mobileDemo.center, 'zoom': mobileDemo.zoom, 'disableDefaultUI':false, 'callback': function() {
var self = this;
self.addMarker({'position': this.get('map').getCenter() }).click(function() {
self.openInfoWindow({ 'content': $info }, this);
});
}});
}).load('basic_map');
});
$('#map').live('pageshow', function() {
gmAPI.add('basic_map', function() { $('#map_canvas').gmap('refresh'); }).load('basic_map');
});
$(document).bind('pagebeforehide',function(){
$("section.main-menu").removeClass("expanded");
});
$(document).bind("ready", function(){
// $(".openmenu").live("tap", function(){
// $("section.main-menu").toggleClass("expanded");
// return!1
// });
$("body").delegate(".openmenu","vclick",function(){
$("section.main-menu").toggleClass("expanded");
return!1
});
// alert(navigator.userAgent)
// $(".newpic img").muImageResize({width: 280, height: 100});
// $('.newlist').swipePlanes();
});
// $(window).resize(function(){
// alert("Resize");
// $(".slidebanner").removeAttr("style");
// $(".slidebanner").find("div").removeAttr("style");
// $(".slideImg").removeAttr("style");
// var $globalW = $(window).width(),
// $slideshow = $(".slideshow");
// $slideshow.css({
// "width": $globalW, "height": Math.floor($globalW/720*240)
// });
// $(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)});
// $('.slideshow').cycle({
// fx:'scrollLeft',
// timeout: 6000,
// });
// });
$(window).bind("orientationchange", function(){
var oc_timer;
clearTimeout(oc_timer);
oc_timer = setTimeout(function () {
$(".slidebanner").removeAttr("style");
$(".slidebanner").find("div").removeAttr("style");
$(".slideImg").removeAttr("style");
// $(".newlist").removeAttr("style");
// $(".newlist").find(".clear").removeAttr("style");
// $(".newitem").removeAttr("style");
// $(".newlist").find(".clear").nextAll("div").remove();
var $globalW = $(window).width(),
$slideshow = $(".slideshow"),
$windowH = $(window).height();
$slideshow.css({
"width": $globalW, "height": Math.floor($globalW/720*240)
});
$(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)});
$('.slideshow').cycle({
fx: $effect,
timeout: $timeout
});
$(".newlist").css({
"width" : $(".newitem").outerWidth()*(Math.floor($globalW/$(".newitem").outerWidth()))+30,
})
$("#map_canvas").css({
'height' : $windowH,
})
// $('.newlist').swipePlanes();
}, 500);
});
+2 -2
View File
@@ -3,5 +3,5 @@
//= require basic/bootstrap
//= require kernel
//= require lib/jquery.preload-min.js
//= require lib/jquery.cycle.all.latest.js
//= require lib/jquery.preload.min.js
//= require cycle2
+2 -5
View File
@@ -1,7 +1,4 @@
//= require basic
//= require lib/jquery-ui-1.10.2.custom.min.js
//= require jquery.ui.sortable
//= require lib/jquery.ui.touch-punch.min.js
//= require lib/jquery.mjs.nestedSortable.js
//= require lib/items/items
//= require lib/items/update_cates_and_tags
//= require lib/items/page_widget_edit_interface
//= require lib/jquery.mjs.nestedSortable.js
+5 -5
View File
@@ -1,17 +1,17 @@
#banner_nav {
.banner_nav {
position: absolute;
z-index: 10;
bottom: 0;
margin-right: 5px;
right: 0;
}
#banner_nav>li {
.banner_nav>li {
float: left;
display: inline-block;
*display: inline;
}
#banner_nav>li>a {
.banner_nav>li>a {
display:block;
width: 10px;
height: 10px;
@@ -25,11 +25,11 @@
text-indent: -9999px;
box-shadow: 0 0 5px rgba(0,0,0,.7);
}
#banner_nav>li>a:hover {
.banner_nav>li>a:hover {
opacity: 1;
filter: alpha(opacity = 100);
}
#banner_nav>li.activeSlide>a {
.banner_nav>li.activeSlide>a {
opacity: 1;
filter: alpha(opacity = 100);
}
+272 -79
View File
@@ -83,6 +83,7 @@ legend {
min-width: 61px;
z-index: 1030;
position: fixed;
padding-top: 40px;
background-color: #171717;
-webkit-box-shadow: inset -1px 0px 10px #000000;
-moz-box-shadow: inset -1px 0px 10px #000000;
@@ -91,12 +92,14 @@ legend {
}
#sidebar #sidebar-menu {
position: absolute;
top: 88px;
top: 85px;
bottom: 0;
z-index: 1;
z-index: 0;
display: block;
width: 61px;
/*overflow: auto;*/
}
#sidebar #sidebar-menu.nano {
top: 0;
}
#sidebar .scroller {
position: absolute;
@@ -120,16 +123,12 @@ legend {
list-style: none;
}
#sidebar > h2.position {
top: 40px;
margin: 0;
width: 61px;
color: #FFFFFF;
font-weight: normal;
font-size: 2.4em;
line-height: 47px;
line-height: 46px\9;
text-align: center;
position: absolute;
position: relative;
background-color: #08c;
background-image: -moz-linear-gradient(top, #08c, #006091);
background-image: -ms-linear-gradient(top, #08c, #006091);
@@ -158,24 +157,20 @@ legend {
}
#sidebar > h2.position a {
color: #FFFFFF;
padding: 6px 6px 5px;
text-decoration: none;
display: inline-block;
-webkit-text-shadow: 0px -1px 0px #333333;
-moz-text-shadow: 0px -1px 0px #333333;
-o-text-shadow: 0px -1px 0px #333333;
text-shadow: 0px -1px 0px #333333;
}
#sidebar > h2.position a i {
line-height: 45px;
}
#sidebar .sidebar-nav > li {
min-width: 61px;
height: 45px;
}
#sidebar .sidebar-nav > li.active {
font-size: 1.2em;
}
#sidebar .sidebar-nav > li.active .sub-nav-block {
display: block;
}
#sidebar .sidebar-nav > li.active > a > span {
#sidebar .sidebar-nav > li.active span {
color: #FFFFFF;
cursor: pointer;
-webkit-text-shadow: 0px -1px 0px #636363;
@@ -183,8 +178,7 @@ legend {
-o-text-shadow: 0px -1px 0px #636363;
text-shadow: 0px -1px 0px #636363;
}
#sidebar .sidebar-nav > li > a > span {
padding: 10px;
#sidebar .sidebar-nav > li span {
color: #B0B0B0;
display: block;
-webkit-text-shadow: 0px 1px 0px #000000;
@@ -192,8 +186,15 @@ legend {
-o-text-shadow: 0px 1px 0px #000000;
text-shadow: 0px 1px 0px #000000;
}
#sidebar .sidebar-nav > li > a > span > i {
font-size: 1.7em;
#sidebar .sidebar-nav > li a {
display: block;
}
#sidebar .sidebar-nav > li i {
font-size: 1.6em;
line-height: 60px;
}
#sidebar .sidebar-nav > li.active i {
font-size: 2.2em;
}
#sidebar .sub-nav-block-list {
top: 40px;
@@ -274,7 +275,7 @@ legend {
}
#sidebar .sub-nav-arrow {
left: 53px;
top: -10px;
top: -16px;
width: 0px;
height: 0px;
z-index: -1;
@@ -282,7 +283,6 @@ legend {
border-style: solid;
border-width: 8px 8px 8px 0;
border-color: transparent #0088CC transparent transparent;
display: none\9; /* 用IE的去死 */
}
@@ -300,14 +300,15 @@ legend {
position: absolute;
z-index: 100;
width: 100%;
border-radius: 1px;
background-color: rgba(0, 136, 204, .3);
border-radius: 50%/1px;
background-color: rgba(0, 136, 204, .6);
}
/* Main Wrap */
#main-wrap {
padding-top: 40px;
position: relative;
}
#main-wrap .wrap-inner {
padding: 60px 20px 20px;
@@ -419,6 +420,7 @@ legend {
/* Search Clear */
.searchClear {
position: relative;
display: inline-block;
}
.searchClear .icon-search {
position: absolute;
@@ -439,79 +441,140 @@ legend {
font-size: 1.2em;
}
/* Edit link in structure */
.editable {
position: relative;
padding: 0px;
margin: 0px;
min-height: 50px;
.page_content {
width: 100%;
height: 100%;
}
.editable {
position: relative;
width: 100%;
height: 100%;
min-height: 50px;
}
.edit_link {
position: absolute;
left: 2px;
right: 2px;
top: 2px;
right: 2px;
bottom: 2px;
border: 2px dashed #1769ff;
border-radius: 5px;
left: 2px;
outline: 1px dashed #0090D5;
z-index: 1000;
opacity: .3;
filter: alpha(opacity = 30);
background-color: #FFF;
-webkit-transition: all .2s linear;
-moz-transition: all .2s linear;
-o-transition: all .2s linear;
transition: all .2s linear;
}
.edit_link a {
color: #333;
position: absolute;
left: 0px;
top: 0px;
right: 0px;
bottom: 0px;
.edit_link:hover {
outline: 2px dashed #E47E6B;
}
.edit_link:hover > a:before {
display: block;
}
.edit_link > a {
text-indent: -99999px;
text-align: left;
margin: 0!important;
padding: 0!important;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.edit_link a:before {
.edit_link > a:before {
display: none;
text-indent: 0;
color: #FFF;
content: attr(title);
padding: 5px;
font-size: 12px;
line-height: 10px;
position: absolute;
top: -2px;
left: -2px;
height: 10px;
background-color: #E47E6B;
}
.edit_link > a:after {
content: "\f044";
color: #0090D5;
font-family: FontAwesome;
position: absolute;
font-style: normal;
top: 50%;
left: 50%;
display: block;
font-size: 1.5em;
font-size: 1em;
width: 24px;
height: 24px;
margin: -12px 0 0 -12px;
margin: -8px 0 0 -12px;
text-indent: 0px;
opacity: .4;
filter: alpha(opacity = 40);
-webkit-transition: all .2s linear;
-moz-transition: all .2s linear;
-o-transition: all .2s linear;
transition: all .2s linear;
}
.editable:hover .edit_link {
opacity: .8;
border: 3px dashed #1769ff;
border-radius: 8px;
filter: alpha(opacity = 80);
.edit_link:hover > a:after {
color: #E47E6B;
}
.editable:hover .edit_link a:before {
font-size: 1.8em;
width: 28px;
height: 28px;
margin: -10px 0 0 -14px;
opacity: 1;
filter: alpha(opacity = 100);
-webkit-transition: all .2s linear;
-moz-transition: all .2s linear;
-o-transition: all .2s linear;
transition: all .2s linear;
/* Page Parts */
.page-parts {
background-color: #E7E7E7;
}
.page-parts body {
background-color: transparent;
}
.page-parts #main-wrap {
padding-top: 0;
}
.page-parts #main-wrap .wrap-inner {
padding: 30px 10px 10px;
}
.page-parts .main-forms {
text-align: center;
}
.page-parts .main-forms fieldset {
text-align: left;
}
.page-parts .main-forms > .btn-group {
margin-bottom: 20px;
}
.page-parts .display-mode td {
padding-bottom: 10px;
}
.page-parts .display-mode td i {
font-size: 2em;
}
.page-parts .radio.inline + .radio.inline,
.page-parts .checkbox.inline + .checkbox.inline {
margin-left: 0;
}
/* Show Preview */
#show_preview .modal {
width: 90%;
margin-left: -45%;
}
#show_preview .modal-body {
padding: 0;
max-height: none;
height: 100%;
overflow: hidden;
}
#show_preview iframe {
border: 0;
outline: none;
width: 100%;
height: 100%;
}
#show_preview form {
text-align: left;
margin-bottom: 0px;
}
#show_preview form .control-group {
margin-bottom: 0;
}
#show_preview form .pull-right + .pull-left {
margin-right: 10px;
}
#show_preview form .control-label {
width: 70px;
}
#show_preview form .controls {
margin-left: 80px;
}
/* tooltip */
@@ -520,10 +583,9 @@ legend {
padding: 0px 5px;
position: absolute;
z-index: 9999;
max-width: 500px;
max-width: 300px;
border-radius: 3px;
background-color: #0088CC;
white-space: nowrap;
}
#sideset .ui-tooltip.sidebar-tooltip:after {
display: none;
@@ -533,10 +595,9 @@ legend {
padding: 0px 5px;
position: absolute;
z-index: 9999;
max-width: 500px;
max-width: 300px;
border-radius: 3px;
background-color: #000000;
white-space: nowrap;
}
.ui-tooltip:after {
content: '';
@@ -551,6 +612,135 @@ legend {
border-color: #000000 transparent transparent transparent;
}
/* Sign In */
#sign-in {
background-color: #F3F3F3;
background-repeat: no-repeat;
background : -webkit-radial-gradient(center center,circle cover, #F3F3F3 10%, #DBDBDB 100%);
background : -moz-radial-gradient(center center,circle cover, #F3F3F3 10%, #DBDBDB 100%);
background : -o-radial-gradient(center center,circle cover, #F3F3F3 10%, #DBDBDB 100%);
background : -ms-radial-gradient(center center,circle cover, #F3F3F3 10%, #DBDBDB 100%);
background : -radial-gradient(center center,circle cover, #F3F3F3 10%, #DBDBDB 100%);
}
.sign-in {
text-align: center;
position: relative;
width: 300px;
margin: 150px auto 0;
}
.sign-in .other-sign-in {
display: none;
}
.sign-in .login-logo {
margin: 0;
padding-bottom: 15px;
border-bottom: 1px solid #ededed;
}
.sign-in .alert {
box-shadow: 0 3px 10px #CBCBCB;
text-align: left;
}
.sign-in .form {
background-color: #FFF;
box-shadow: 0 10px 20px #CBCBCB;
padding: 15px;
margin-bottom: 20px;
}
.sign-in .form-block {
overflow: hidden;
}
.sign-in .form-list {
width: 555px;
}
.sign-in .content {
float: left;
margin-bottom: 0;
position: relative;
}
.sign-in .content + .content {
margin-left: 15px;
}
.sign-in .control-group {
position: relative;
width: 270px;
margin: 0;
}
.sign-in .control-group label {
position: absolute;
top: 0;
left: 0;
width: 39px;
height: 40px;
line-height: 40px;
margin: 0;
color: #5C5C5C;
}
.sign-in .control-group input {
width: 222px;
height: 30px;
padding: 4px 6px 4px 40px;
margin-bottom: 25px;
}
.sign-in .btn {
padding: 4px 0;
display: block;
width: 100%;
margin-bottom: 10px;
}
.sign-in .other-sign-in {
position: relative;
margin-top: 20px;
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 1px solid #ededed;
}
.sign-in .other-sign-in p {
position: absolute;
width: 30px;
height: 30px;
background-color: #FFF;
padding: 0 10px;
margin-bottom: 0;
margin-left: -25px;
line-height: 30px;
left: 50%;
bottom: -15px;
font-size: 1.3em;
color: #b1b1b1;
}
.sign-in .checkbox {
position: absolute;
text-align: left;
bottom: 37px;
}
.sign-in .switchboard {
color: #08C;
cursor: pointer;
}
.sign-in .switchboard span,
.sign-in .switchboard.active i {
display: inline;
}
.sign-in .switchboard.active span,
.sign-in .switchboard i {
display: none;
}
.register {
box-shadow: inset 0 5px 5px #E0E0E0;
background-color: #eee;
padding: 15px;
margin: 15px -15px -15px;
}
.register .btn {
margin: 0;
}
.have-other-sign-in {
margin: 80px auto 0;
}
.have-other-sign-in .other-sign-in {
display: block;
}
/* IE go die */
:root #sidebar .sub-nav-block:before {
display: block\9;
@@ -566,6 +756,9 @@ legend {
width: auto;
margin-left: auto;
}
#show_preview .modal {
margin-left: 0 auto;
}
}
@media (max-width: 480px) {
@@ -20,6 +20,9 @@
.nano .content::-webkit-scrollbar {
visibility: hidden;
}
.nano .content iframe {
position: absolute;
}
.has-scrollbar .content::-webkit-scrollbar {
visibility: visible;
}
@@ -19,6 +19,18 @@
margin-left: 0;
}
}
.form_fix {
textarea {
margin-bottom: 12px;
}
input[type="text"] {
margin-left: 0;
margin-top: 0;
}
input[type="text"] + input {
margin-top: 12px;
}
}
// fixed width column with 12px gutter
// 276px width for 8 columns
// 420px width for 12 columns
@@ -323,6 +323,29 @@ a.admtxt.admbg2:hover {
float: left; }
.docklist .d_cate:hover .dock_child {
display: block; }
.disable {
opacity: .3;
}
.disable a {
cursor: not-allowed;
}
.private {
position: relative;
padding-right: 10px;
width: 300px;
opacity: .3 !important;
}
.private:after {
content: "\e073";
display: inline-block;
font-family: 'entypo';
font-size: 1.5em;
position: absolute;
right: 0;
text-align: center;
text-decoration: inherit;
top: 5px;
}
.fn_des.admtxt {
line-height: 60px;
@@ -714,7 +737,8 @@ a.admtxt.admbg2:hover {
/* list item */
.list_t_item {
overflow: hidden; }
overflow: hidden;
height: 100px; }
.list_t_title {
padding-bottom: 6px;
@@ -748,7 +772,8 @@ a.admtxt.admbg2:hover {
-webkit-text-size-adjust: none; }
.list_item_function a :first-child {
margin-left: 0; }
.datalist_item:hover .list_item_function {
.datalist_item:hover .list_item_function,
.list_t_item:hover .list_item_function {
bottom: 0; }
/* App */
@@ -125,6 +125,14 @@
}
#list-view .checkbox-card li {
-webkit-transition: none;
-moz-transition: none;
-o-transition: none;
transition: none;
}
/* Responsive */
@media (max-width: 767px) {
@@ -0,0 +1,52 @@
/* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */
/*<!--breakpoint-->*/
.breakpoints {width: .8em;}
.breakpoint { color: #822; }
/*<!--match-->*/
span.CodeMirror-matchhighlight { background: #494949 }
.CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67 !important; }
/*<!--activeline-->*/
.activeline {background: #253540 !important;}
.cm-s-midnight.CodeMirror {
background: #0F192A;
color: #D1EDFF;
}
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
.cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;}
.cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;}
.cm-s-midnight .CodeMirror-linenumber {color: #D0D0D0;}
.cm-s-midnight .CodeMirror-cursor {
border-left: 1px solid #F8F8F0 !important;
}
.cm-s-midnight span.cm-comment {color: #428BDD;}
.cm-s-midnight span.cm-atom {color: #AE81FF;}
.cm-s-midnight span.cm-number {color: #D1EDFF;}
.cm-s-midnight span.cm-property, .cm-s-tropicaleve span.cm-attribute {color: #A6E22E;}
.cm-s-midnight span.cm-keyword {color: #E83737;}
.cm-s-midnight span.cm-string {color: #1DC116;}
.cm-s-midnight span.cm-variable {color: #FFAA3E;}
.cm-s-midnight span.cm-variable-2 {color: #FFAA3E;}
.cm-s-midnight span.cm-def {color: #4DD;}
.cm-s-midnight span.cm-error {background: #F92672; color: #F8F8F0;}
.cm-s-midnight span.cm-bracket {color: #D1EDFF;}
.cm-s-midnight span.cm-tag {color: #008;}
.cm-s-midnight span.cm-link {color: #AE81FF;}
.cm-s-midnight .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}
.typ { color: #FFAA3E; }
.atn { color: #606; }
.atv { color: #080; }
.dec { color: #606; }
+20 -18
View File
@@ -1,21 +1,23 @@
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/ambiance-mobile.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/ambiance.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/blackboard.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/cobalt.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/eclipse.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/elegant.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/erlang-dark.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/midnight.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/monokai.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/neat.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/night.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/rubyblue.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/solarized.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/theme.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/twilight.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/vibrant-ink.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/xq-dark.css);
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/xq-light.css);
/*
*= require 'lib/codemirror/theme/ambiance-mobile'
*= require "lib/codemirror/theme/ambiance"
*= require "lib/codemirror/theme/blackboard"
*= require "lib/codemirror/theme/cobalt"
*= require "lib/codemirror/theme/eclipse"
*= require "lib/codemirror/theme/elegant"
*= require "lib/codemirror/theme/erlang-dark"
*= require "lib/codemirror/theme/midnight"
*= require "lib/codemirror/theme/monokai"
*= require "lib/codemirror/theme/neat"
*= require "lib/codemirror/theme/night"
*= require "lib/codemirror/theme/rubyblue"
*= require "lib/codemirror/theme/solarized"
*= require "lib/codemirror/theme/theme"
*= require "lib/codemirror/theme/twilight"
*= require "lib/codemirror/theme/vibrant-ink"
*= require "lib/codemirror/theme/xq-dark"
*= require "lib/codemirror/theme/xq-light"
*/
.cm-tab {
border-left: 1px solid rgba(200, 200, 200, .2);
}
+28
View File
@@ -0,0 +1,28 @@
.table .listCheckHead,
.table .listCheck {
width: 30px;
vertical-align: middle;
padding: 0 0 0 10px!important;
}
.listCheckHead .list-check,
.listCheck .list-check {
position: absolute;
margin: -12px 0 0 -1px;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
opacity: 0;
}
.listCheckHead i,
.listCheck i {
display: block;
}
.checkHide td {
background-color: #E6E6E6 !important;
color: #B9B9B9;
}
.checkHide a {
color: #B9B9B9;
}
.checkHit td {
background-color: #FFFEDB !important;
}
+82 -2
View File
@@ -280,6 +280,17 @@
line-height: 26px;
margin: 0;
}
.main-forms .attributes-header h4 b {
padding: 0 1px;
border-style: dotted;
border-width: 0 2px;
border-color: #AAA;
margin-right: 5px;
cursor: move;
}
.main-forms .attributes-header h4 i {
cursor: pointer;
}
.main-forms .field-type {
background-color: #f5f5f5;
border-radius: 5px;
@@ -307,7 +318,7 @@
.main-forms .field-type .control-group:last-child {
margin-bottom: 10px;
}
#new-user-forms .control-group .add-target .input-append,
#user-forms .control-group .add-target .input-append,
.main-forms .field-type .control-group .add-target .input-append {
display: block;
margin-bottom: 10px;
@@ -323,8 +334,77 @@
.main-forms .control-group .add-target .btn-group .btn.last {
border-radius: 0 4px 4px 0;
}
.main-forms .parts-none {
width: 100%;
text-align: center;
padding: 50px 0 70px;
font-size: 2em;
}
.main-forms .display-mode .typesetting {
margin: 0 0 10px 0;
}
.main-forms .display-mode table td:last-child {
text-align: right;
}
.main-forms .display-mode .typesetting li {
display: inline-block;
float: left;
width: 120px;
position: relative;
padding: 2px;
text-align: center;
}
.main-forms .display-mode .typesetting li + li {
margin-left: 10px;
}
.main-forms .display-mode .typesetting li.active {
padding: 0;
width: 124px;
}
.main-forms .display-mode .typesetting li.active:after {
font-family: FontAwesome;
content: "\f00c";
font-size: 12px;
text-indent: 15px;
line-height: 18px;
color: #FFF;
position: absolute;
top: 2px;
right: 2px;
width: 0px;
height: 0px;
border-style: solid;
border-width: 0 30px 30px 0;
border-color: transparent #FFA307 transparent transparent;
z-index: 1;
}
.main-forms .display-mode .typesetting li.active img {
border-radius: 5px;
background-color: #FFA307;
padding: 2px;
}
.main-forms .display-mode .typesetting img {
width: 120px;
height: 120px;
}
.main-forms .display-mode .typesetting input[type="radio"] {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0)0;
opacity: 0;
position: absolute;
width: 100%;
height: 100%;
margin: 0;
}
.main-forms .display-mode .typesetting .style_description {
display: block;
line-height: 1.2em;
font-size: 12px;
color: #686868;
padding-top: 10px;
}
#new-user-forms .control-group .add-target .input-append input.last {
#user-forms .control-group .add-target .input-append input.last {
border-radius: 4px;
}
-193
View File
@@ -1,193 +0,0 @@
/* Main List */
.main-list {
margin-bottom: 10px;
}
.main-list tbody {
border: 1px solid #dddddd;
}
.main-list thead {
border: 1px solid #454545;
}
.main-list thead th {
vertical-align: middle;
background-color: #454545;
white-space: nowrap;
color: #FFFFFF;
}
.main-list tbody tr.disable td {
color: #C5C5C5;
background-color: #eeeeee;
}
.main-list tbody tr.disable td .label-info {
background-color: #999999;
}
.main-list tbody tr.active td:first-child {
position: relative;
}
.main-list tbody tr.active td:first-child:before {
content: "";
width: 0px;
height: 0px;
left: -21px;
top: 50%;
margin-top: -6px;
position: absolute;
border-style: solid;
border-width: 6px 0 6px 6px;
border-color: transparent transparent transparent #333333;
}
.main-list td {
background-color: #FFFFFF;
}
.main-list td.action {
vertical-align: middle;
text-align: right;
}
.main-list td.preview img {
width: 100%;
}
.main-list td .banner-link {
width: 100px;
max-width: 120px;
display: inline-block;
text-overflow: ellipsis;
overflow: hidden;
}
.main-list td .file-list {
display: inline-block;
margin: 0 0 -6px;
}
.main-list td .file-list:after {
content: "";
clear: both;
display: block;
height: 0;
visibility: hidden;
}
.main-list td .file-type {
position: relative;
list-style: none;
float: left;
display: inline-block;
}
.main-list td .file-type a {
background-color: #A6A6A6;
color: #FFFFFF;
margin-right: 10px;
padding: 2px 5px 2px 3px;
border-radius: 3px;
text-decoration: none;
text-shadow: 0px -1px 0px rgba(100, 100, 100, .6);
}
.main-list td .file-type i,
.main-forms fieldset .input-area .controls .file-type i {
width: 16px;
height: 16px;
margin-bottom: -1px;
display: inline-block;
}
.main-list td .file-type[class^="type-"] i,
.main-list td .file-type[class*=" type-"] i,
.main-forms fieldset .input-area .controls .file-type[class*=" type-"] i,
.main-forms fieldset .input-area .controls .file-type[class^="type-"] i {
background-image: url(/orbit_4.0.1/assets/images/file_type.png);
}
.file-type.type-pdf i {background-position: 0px 0px;}
.file-type.type-psd i {background-position: -16px 0px;}
.file-type.type-ai i {background-position: -32px 0px;}
.file-type.type-fla i {background-position: -48px 0px;}
.file-type.type-in i {background-position: -64px 0px;}
.file-type.type-acc i {background-position: 0px -16px;}
.file-type.type-do i {background-position: -16px -16px;}
.file-type.type-xl i {background-position: -32px -16px;}
.file-type.type-pp i {background-position: -48px -16px;}
.file-type.type-zip i {background-position: -64px -16px;}
.file-type.type-txt i {background-position: 0px -32px;}
.file-type.type-jp i {background-position: -16px -32px;}
.file-type.type-gif i {background-position: -32px -32px;}
.file-type.type-png i {background-position: -48px -32px;}
.file-type.type-audio i {background-position: -64px -32px;}
.main-list td .quick-edit {
height: 24px;
margin-top: 5px;
}
.main-list td .quick-edit .nav {
display: none;
margin-bottom: 0;
}
.main-list tr:hover .quick-edit .nav {
display: block;
}
.main-list td .quick-edit .nav > li > a {
padding-top: 4px;
padding-bottom: 4px;
margin-top: 0px;
margin-bottom: 0px;
border: 1px dotted #d1d1d1;
}
.main-list td .quick-edit .nav > li > a:hover {
border: 1px dotted transparent;
}
.main-list thead tr.sort-header th a {
padding: 8px;
margin: -8px;
display: block;
color: #FFFFFF;
text-decoration: none;
}
.main-list thead tr.sort-header th.active a {
padding-bottom: 4px;
border-bottom: 4px solid #08c;
}
.main-list .footable-row-detail td {
padding: 0;
border-top: none;
}
.main-list .footable-row-detail td .footable-row-detail-inner {
display: none;
padding: 8px;
position: relative;
border-radius: 5px;
margin: 0 8px 8px;
background-color: #ededed;
}
.main-list .footable-row-detail td .footable-row-detail-inner:after {
display: block;
height: 0px;
width: 0px;
position: absolute;
top: -6px;
left: 50%;
margin-left: -3px;
content: "";
border-style: solid;
border-width: 0 6px 6px 6px;
border-color: transparent transparent #ededed transparent;
}
.main-list .footable-row-detail td .footable-row-detail-inner div {
margin: 10px 0;
}
#preview .preview {
margin: 0 auto;
}
/* For Retina */
@media screen and (-webkit-min-device-pixel-ratio: 2), screen and (max--moz-device-pixel-ratio: 2) {
.main-list td .file-type[class^="type-"] i,
.main-list td .file-type[class*=" type-"] i,
.main-forms fieldset .input-area .controls .file-type[class*=" type-"] i,
.main-forms fieldset .input-area .controls .file-type[class^="type-"] i {
background-image: url(/orbit_4.0.1/assets/images/file_type@2x.png);
background-size: 80px 48px;
}
}
/* Responsive */
@media (max-width: 480px) {
.main-list td .quick-edit .nav {
display: block;
}
}
@@ -39,6 +39,13 @@
.main-list td {
background-color: #FFFFFF;
}
.main-list td input[type="text"] {
margin-bottom: 0;
margin-left: -.4em;
margin-right: 3px;
padding: 0 .3em;
width: 4em;
}
.main-list td.action {
vertical-align: middle;
text-align: right;
+95 -30
View File
@@ -2,9 +2,20 @@
#list-view h4 a {
color: #000;
text-decoration: none;
display: block;
width: 100%;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
/* List */
#list-view #member-list tr.highlight td {
background-color: #FFFAE5;
}
#list-view #member-list tr.highlight td:first-child {
padding: 0
}
#list-view #member-list .gender,
#list-view #member-list td[class^="gender-"] {
width: 5px;
@@ -106,10 +117,31 @@
#list-view #member-abstract .member-avatar .action > a.trash {
background-color: #b94a48;
}
#list-view #member-abstract .member-avatar > span {
/*#list-view #member-abstract .member-avatar:after {
content: "";
position: absolute;
width: 250px;
height: 120px;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: block;
margin: 0;
background-color: #000000;
-webkit-border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
opacity: 0;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
}*/
#list-view #member-abstract > li .member-avatar:after {
-webkit-backface-visibility: hidden;
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: block;
margin: 0;
background-color: #000000;
@@ -120,7 +152,8 @@
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
}
#list-view #member-abstract > li:hover .member-avatar > span {
#list-view #member-abstract > li:hover .member-avatar:after {
-webkit-backface-visibility: hidden;
opacity: .4;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
filter: alpha(opacity=40);
@@ -159,14 +192,13 @@
float: left;
position: relative;
}
#list-view #member-card > li:hover .member-avatar > span {
opacity: 0.4;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
filter: alpha(opacity=40);
}
#list-view #member-card > li:hover .member-avatar .action {
visibility: visible;
}
#list-view #member-card .highlight {
background-color: #F0F0F0;
outline: 1px dashed #9E9E9E;
}
#list-view #member-card .member-avatar {
width: 150px;
height: 150px;
@@ -183,14 +215,37 @@
#list-view #member-card .member-avatar.gender-woman {
border-color: #FF3196;
}
#list-view #member-card .member-avatar.gender-none {
#list-view #member-card .member-avatar.gender-nene {
border-color: #DDDDDD;
}
#list-view #member-card .member-avatar img {
/*width: 100%;*/
max-width: none;
}
#list-view #member-card .member-avatar > span {
#list-view #member-card > li .member-avatar:after {
-webkit-backface-visibility: hidden;
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: block;
margin: 0;
background-color: #000000;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
opacity: 0;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
}
#list-view #member-card > li:hover .member-avatar:after {
opacity: .4;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
filter: alpha(opacity=40);
}
/*#list-view #member-card .member-avatar > span {
position: absolute;
width: 150px;
height: 150px;
@@ -203,7 +258,7 @@
opacity: 0;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
}
}*/
#list-view #member-card .member-avatar .action {
position: absolute;
z-index: 1;
@@ -262,22 +317,25 @@
margin-top: 20px;
}
#profile #basic-info .member-avatar {
width: 106px;
height: 106px;
width: 103px;
height: 103px;
float: left;
}
#profile #basic-info .member-avatar img {
border: 3px solid #ffffff;
width: 100%;
max-width: none;
-webkit-border-radius: 9px;
-moz-border-radius: 9px;
border-radius: 9px;
}
#profile #basic-info .member-avatar.gender-man img {
#profile #basic-info .member-avatar:after {
content: "";
-webkit-backface-visibility: hidden;
}
#profile #basic-info .member-avatar.gender-man {
border-color: #34ADFF;
}
#profile #basic-info .member-avatar.gender-woman img {
#profile #basic-info .member-avatar.gender-woman {
border-color: #FF3196;
}
#profile #basic-info .member-avatar.gender-none img {
#profile #basic-info .member-avatar.gender-none {
border-color: #DDDDDD;
}
#profile #member-roles {
@@ -313,20 +371,27 @@
#profile #member-roles .roles dd {
color: #999999;
}
#profile #module-navbar {
margin-left: 10px;
}
#profile #module-navbar .navbar {
margin-bottom: 15px;
}
#profile #member-module {
margin-left: 360px;
}
#profile #member-module #module-navbar.scroll-to-fixed-fixed {
background-color: #F3F3F3;
padding-top: 20px;
}
#profile #member-module #module-navbar.scroll-to-fixed-fixed .navbar {
margin-bottom: 10px;
}
#profile #member-module #module-content {
padding: 0 10px;
padding: 0 0 0 10px;
}
#profile #member-module #module-content .content {
right: 10px;
padding-bottom: 10px;
outline: none;
}
#profile #member-module #module-content .list-active {
padding-bottom: 8px;
/*border-bottom: 1px solid #DDD;*/
}
/* Responsive */
@media (max-width: 979px) {
@@ -1,55 +0,0 @@
/** initial setup **/
.nano {
position : relative;
width : 100%;
height : 100%;
overflow : hidden;
}
.nano .content {
position : absolute;
overflow : scroll;
overflow-x : hidden;
top : 0;
right : 0;
bottom : 0;
left : 0;
}
.nano .content:focus {
outline: thin dotted;
}
.nano .content::-webkit-scrollbar {
visibility: hidden;
}
.has-scrollbar .content::-webkit-scrollbar {
visibility: visible;
}
.nano > .pane {
/*background : rgba(0,0,0,.25);*/
position : absolute;
width : 10px;
right : 0;
top : 0;
bottom : 0;
visibility : hidden\9; /* Target only IE7 and IE8 with this hack */
opacity : .01;
-webkit-transition : .2s;
-moz-transition : .2s;
-o-transition : .2s;
transition : .2s;
-moz-border-radius : 5px;
-webkit-border-radius : 5px;
border-radius : 5px;
}
.nano > .pane > .slider {
background: #444;
background: rgba(0,0,0,.5);
position : relative;
margin : 0 1px;
-moz-border-radius : 3px;
-webkit-border-radius : 3px;
border-radius : 3px;
}
.nano:hover > .pane, .pane.active, .pane.flashed {
visibility : visible\9; /* Target only IE7 and IE8 with this hack */
opacity : 0.99;
}
+147 -26
View File
@@ -8,7 +8,7 @@
overflow: auto;
/* Specify the width of your pageslide here */
padding: 5px;
/*padding: 5px;*/
/* These styles are optional, and describe how the pageslide will look */
background-color: #333;
@@ -17,34 +17,29 @@
-moz-box-shadow: inset 0 0 5px 5px #222;
box-shadow: inset 0 0 5px 5px #222;
}
#pageslide .page-title {
padding: 10px;
background-color: #232323;
border-bottom: 1px solid #424242;
line-height: 2em;
}
#pageslide .page-title a {
color: #FFF;
text-decoration: none;
font-size: 1.6em;
}
#pageslide .page-title span {
font-size: 1.7em;
}
#pageslide .view-page {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
#pageslide .content {
padding: 15px;
}
#pageslide #view-page .content,
#pageslide #view-page .pane {
outline: none;
padding: 0px;
margin-top: 57px;
}
#pageslide #view-page .content {
padding-bottom: 10px;
}
#pageslide #view-page .page-info {
padding: 0 10px;
border-bottom: 1px solid #222222;
box-shadow: 0px 1px 0px #404040;
line-height: 50px;
}
#pageslide #view-page .page-info a {
color: #8f8f8f;
font-size: 2em;
text-decoration: none;
}
#pageslide #view-page .page-info a:hover {
color: #efefef;
}
#pageslide #view-page .page-info h3 {
margin: 5px 0;
}
#pageslide form {
margin-bottom: 0;
@@ -89,4 +84,130 @@
display: inline-block;
height: 30px;
padding: 0 2px 0 5px;
}
#pageslide .groups {
margin-bottom: 10px;
}
#pageslide .error-cover {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
text-align: center;
background-color: #333;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=95)";
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=95);
opacity: .95;
}
#pageslide .error-cover .msg {
position: absolute;
top: 50%;
margin-top: -55px;
height: 110px;
width: 100%;
}
#pageslide .error-cover i {
font-size: 6em;
}
#pageslide .error-cover p {
font-size: 1.3em;
}
#pageslide .suckIE {
color: #EE4545;
}
#pageslide .link-options {
display: none;
}
#pageslide .active-link {
margin-bottom: 10px;
}
#pageslide .active-link > label {
margin-bottom: 0;
}
#pageslide .active-link .active-mune {
margin-left: 20px;
display: none;
}
#pageslide .active-link .active-mune span {
display: inline-block;
margin-right: 20px;
margin-top: 5px;
color: #8A8A8A;
float: left;
}
#pageslide .display-mode i {
font-size: 2em;
}
#pageslide .display-mode table {
margin-bottom: 10px;
text-align: left;
}
#pageslide .display-mode table td:last-child {
text-align: right;
}
#pageslide .display-mode table thead th {
color: #8A8A8A;
font-size: 12px;
}
#pageslide .typesetting {
margin: 0;
list-style: none;
}
#pageslide .typesetting li {
width: 60px;
height: 60px;
position: relative;
margin-bottom: 10px;
padding: 2px;
}
#pageslide .typesetting li.active {
border-radius: 5px;
background-color: #fff;
}
#pageslide .typesetting li.active:after {
font-family: FontAwesome;
content: "\f00c";
font-size: 12px;
text-indent: 15px;
line-height: 18px;
color: #08C;
position: absolute;
top: 2px;
right: 2px;
width: 0px;
height: 0px;
border-style: solid;
border-width: 0 30px 30px 0;
border-color: transparent #FFF transparent transparent;
z-index: 1;
}
#pageslide .typesetting input[type="radio"] {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0)0;
opacity: 0;
position: absolute;
width: 100%;
height: 100%;
margin: 0;
}
#pageslide .typesetting img {
width: 100%;
height: 100%;
}
#pageslide .typesetting .style_description {
position: absolute;
width: 195px;
top: 0;
left: 75px;
line-height: 1.1em;
font-size: 12px;
color: #E7E7E7;
padding-top: 5px;
}
/* iFrame */
#pageslide_iframe .page_content {
background-color: #000;
}
+21 -21
View File
@@ -6,22 +6,22 @@
.tags .lead .badge {
margin-top: 5px;
}
.tags .tags-groups {
.tags-groups {
list-style: none;
margin: 0 0 20px;
padding: 0;
}
.tags .tags-groups:after {
.tags-groups:after {
content: "";
clear: both;
height: 0;
display: block;
visibility: hidden;
}
.tags .tags-groups.module-tags li.default a {
.tags-groups.module-tags li.default a {
margin-left: 5px;
}
.tags .tags-groups li {
.tags-groups li {
overflow: hidden;
float: left;
width: auto;
@@ -39,7 +39,7 @@
-o-transition: all .2s linear;
transition: all .2s linear;
}
.tags .tags-groups li.mark {
.tags-groups li.mark {
width: 0;
height: 0;
padding: 0;
@@ -49,28 +49,28 @@
opacity: 0;
visibility: hidden;
}
.tags .tags-groups li.active {
.tags-groups li.active {
background-color: #3a87ad;
}
.tags .tags-groups li.active .amount {
.tags-groups li.active .amount {
color: #8cb8be;
}
.tags .tags-groups li a {
.tags-groups li a {
text-decoration: none;
color: #ededed;
}
.tags .tags-groups li .amount {
.tags-groups li .amount {
color: #fdcf3b;
float: right;
margin-left: 15px;
}
.tags .tags-groups li .card {
.tags-groups li .card {
position: relative;
margin: 0;
width: 18px;
height: 18px;
}
.tags .tags-groups li .card:after {
.tags-groups li .card:after {
font-family: FontAwesome;
content: '\f111';
color: #fdcf3b;
@@ -82,13 +82,13 @@
left: 0;
top: 0;
}
.tags .tags-groups li .card.active:after {
.tags-groups li .card.active:after {
content: '\f058';
font-size: 18px;
left: -2px;
top: 1px;
}
.tags .tags-groups li .card input {
.tags-groups li .card input {
position: absolute;
top: 0;
left: 0;
@@ -110,10 +110,10 @@
#tags-merger form {
margin-bottom: 0;
}
#tags-merger .tags .tags-groups li {
#tags-merger .tags-groups li {
cursor: pointer;
}
#tags-merger .tags .tags-groups li.def {
#tags-merger .tags-groups li.def {
background-color: #468847;
}
#tags-merger .modal-body .pull-left {
@@ -127,22 +127,22 @@
.tags .tags-groups li.default {
.tags-groups li.default {
background-color: #468847;
}
.tags .tags-groups li.default.active {
.tags-groups li.default.active {
background-color: #3a87ad;
}
.tags .tags-groups li.default .amount {
.tags-groups li.default .amount {
color: #8cbe9a;
}
.tags .tags-groups li.default.active .amount {
.tags-groups li.default.active .amount {
color: #8cb8be;
}
.tags .tags-groups li.default .card:after {
.tags-groups li.default .card:after {
color: #8cbe9a;
}
.tags .tags-groups li.active .card:after {
.tags-groups li.active .card:after {
color: #8cb8be;
}
+16
View File
@@ -26,6 +26,12 @@
margin-top: 4px;
margin-left: 10px;
}
.topnav .btn-group {
margin-left: 0;
}
.topnav .view-switch {
margin-left: 10px;
}
/* Bottom Nav */
.bottomnav {
@@ -41,6 +47,16 @@
.bottomnav .action {
margin-bottom: 6px;
}
.bottomnav .divider {
display: inline-block;
position: relative;
margin: 0 5px;
background-color: #E0E0E0;
width: 1px;
height: 16px;
top: 5px;
box-shadow: 1px 0 0 #FFF;
}
.bottomnav .pagination {
margin: 0;
}
+10
View File
@@ -0,0 +1,10 @@
/*
*This is a manifest file that'll automatically include all the stylesheets available in this directory
*and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
*the top of the compiled file, but it's generally better to create a new file per style scope.
*= require mobile/jquery.mobile-1.2.0.css
*= require mobile/add2home
*= require mobile/orbit-mobile
*= require basic/icon
*= require basic/font-awesome
*/
+158
View File
@@ -0,0 +1,158 @@
/**
*
* Main container
*
*/
#addToHomeScreen {
z-index:9999;
-webkit-user-select:none;
-webkit-box-sizing:border-box;
width:240px;
font-size:15px;
padding:12px 14px;
text-align:left;
font-family:helvetica;
background-image:-webkit-gradient(linear,0 0,0 100%,color-stop(0,#fff),color-stop(0.02,#eee),color-stop(0.98,#ccc),color-stop(1,#a3a3a3));
border:1px solid #505050;
-webkit-border-radius:8px;
-webkit-background-clip:padding-box;
color:#333;
text-shadow:0 1px 0 rgba(255,255,255,0.75);
line-height:130%;
-webkit-box-shadow:0 0 4px rgba(0,0,0,0.5);
}
#addToHomeScreen.addToHomeIpad {
width:268px;
font-size:18px;
padding:14px;
}
/**
*
* The 'wide' class is added when the popup contains the touch icon
*
*/
#addToHomeScreen.addToHomeWide {
width:296px;
}
#addToHomeScreen.addToHomeIpad.addToHomeWide {
width:320px;
font-size:18px;
padding:14px;
}
/**
*
* The balloon arrow
*
*/
#addToHomeScreen .addToHomeArrow {
position:absolute;
background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(0,rgba(204,204,204,0)),color-stop(0.4,rgba(204,204,204,0)),color-stop(0.4,#ccc));
border-width:0 1px 1px 0;
border-style:solid;
border-color:#505050;
width:16px; height:16px;
-webkit-transform:rotateZ(45deg);
bottom:-9px; left:50%;
margin-left:-8px;
-webkit-box-shadow:inset -1px -1px 0 #a9a9a9;
-webkit-border-bottom-right-radius:2px;
}
/**
*
* The balloon arrow for iPad
*
*/
#addToHomeScreen.addToHomeIpad .addToHomeArrow {
-webkit-transform:rotateZ(-135deg);
background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(0,rgba(238,238,238,0)),color-stop(0.4,rgba(238,238,238,0)),color-stop(0.4,#eee));
-webkit-box-shadow:inset -1px -1px 0 #fff;
top:-9px; bottom:auto; left:50%;
}
/**
*
* Close button
*
*/
#addToHomeScreen .addToHomeClose {
-webkit-box-sizing:border-box;
position:absolute;
right:4px;
top:4px;
width:18px;
height:18px; line-height:14px;
text-align:center;
text-indent:1px;
-webkit-border-radius:9px;
background:rgba(0,0,0,0.12);
color:#707070;
-webkit-box-shadow:0 1px 0 #fff;
font-size:16px;
}
/**
*
* The '+' icon, displayed only on iOS < 4.2
*
*/
#addToHomeScreen .addToHomePlus {
font-weight:bold;
font-size:1.3em;
}
/**
*
* The 'share' icon, displayed only on iOS >= 4.2
*
*/
#addToHomeScreen .addToHomeShare {
display:inline-block;
width:18px;
height:15px;
background-repeat:no-repeat;
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAPCAQAAABDj1eZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAUdJREFUKFNtkLtLw1AYxS/qJLhXVKr2ZRulUNtiqgSb3CziICI6ucTFVYcOnaQOFRwUnNTRwUWXgpP/QdHNUEQUHGxofYBTlRs83iZNjKTncOGe7/vx3QchXUWn6FL3jhfKUdCCr5zuifV5oDiHQM+c+CIhiiCSWNu08iq9oHXKLAiqrgR4UXqlOEYZt++ExEL0wW7+OW0G10muLv9gmqfe5FAWKmTMYQYiFL7PYwyLOD8lSjNh2gdnPzMII4QUBxc4OothbAF7GCBKQ0YbSWyPQsIhqvetS+y0ygGMo/KFZfviDvR4AhwgZU9dGYnA0J/6ndc15i3ouYIMcVVUcEXIoOxCeRCfwP8sXBSdjtpUv/1QW+K16kCCIUC4id9Fa0JtkluwVkSfqPL6RwfSDA0aNlx7k/bWgViB7bMS2/1vk5sdsZLN/ALSuL3tylO4RAAAAABJRU5ErkJggg==);
background-size:18px 15px;
text-indent:-9999em;
overflow:hidden;
}
/**
*
* The touch icon (if available)
*
*/
#addToHomeScreen .addToHomeTouchIcon {
display:block;
float:left;
-webkit-border-radius:6px;
-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.5),
inset 0 0 2px rgba(255,255,255,0.9);
background-repeat:no-repeat;
width:57px; height:57px;
-webkit-background-size:57px 57px;
margin:0 12px 0 0;
border:1px solid #333;
-webkit-background-clip:padding-box;
}
/**
*
* The 'share' icon for retina display
*
*/
@media all and (-webkit-min-device-pixel-ratio: 2) {
#addToHomeScreen .addToHomeShare {
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAeCAQAAADu6HTYAAADPElEQVR4Xq3TX2gcRRzA8e/M7mVv2+TSNpc/TZtrY6jUGqgaSAmEChKLrYK0YH0RFC2CSCkEfCghiKU04J8qNigq6os+iQV98MHWFwVBrQQRWs21lBw5cw3NNb1/udu72RGG5Y77IzXW77D7sAwf5scyYoL6BGXSDKFZwaGpLvIUaeoCkvX1MmsM0Ny6oRSQYOLuIS+YZOpfQdqslpUxcZrzTVAz4qPwW2O3CeIwC/RSzeY6Ow1QhUrkr+YOWfEKDkEP8Rij7CHKJmrFSDHBdwGEE5wiGChPN+PnT8VdRtEIl1d4gRj/1EVe5ZSBKGh8iqQpo/Fo5+3C/gz0MYg4zgwbqday1/Q4B8BGQ45d/Hi54lakCrU5obOcidJpu1+Lg9whjabyaOYLnrIBFFaRD+xe2ybMDWY66GmP/WA9cGfGp0CWhy0wkMN8inepFiH2rV1j0NQSNQbFLRQnS8/8YSDBBpadfv4CYDub2fmeHDNAsL1MBWUel0iA+Xik6eHcyvD3vAMSU1TGuA/YRS+dD7ovCQN43GKRFCU20Kd3V/avDVVyAZ5niTEuLA5/zBGWg9EEEhfJKN200Tat8CmRAQb9+wv7soPlHt2tQorsz1uPbr0HTY4sJwrH47zJZwABBAKLMBoQXepwgTwdHCo+fXMkQ4lrxEmQ5AaXipPqDY9V2vn09tgvTPI71EEGYxM+/uMJLJ4svpgaWGKOi/xKgmqLSUGSUd5f2vIVJ/CgBaTIUsZ7ZBsn0+NzfMOXLFCXQyTcybN6ep5ZZgUOHn7jpfUpsZshdugPGf+E5zjbyHTSRyQ8xfRPPM/s63RHeuknSoT22mjmmnAOIMkUZ6D1xSfPPAfd1WFKM3sO2CMaHx8M1NjnXKHaAGGkOW0C02WeYHUz4qMtx+w5gUDS8NckYe5lHsMYwCZEPyEEmjLDZFmAS7CDviMdxyTkMNVBKEmYLvbiQQBIBBbCQG04bGQvFWz6CfsCQLWCigILFwcfkGYBiOpbYuOizTAyYyDdCtrGaRG1LCkIgMYEFhI0WqQZoSlbGRyHKe4qOx7iv2bVQW9dp4dlM/x6kmwnWQcd/Q3FCqwTEiT5s+6D5v/pb0SSHyg7uhMWAAAAAElFTkSuQmCC);
}
}
+303
View File
@@ -0,0 +1,303 @@
/* Font Awesome
the iconic font designed for use with Twitter Bootstrap
-------------------------------------------------------
The full suite of pictographic icons, examples, and documentation
can be found at: http://fortawesome.github.com/Font-Awesome/
License
-------------------------------------------------------
The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0:
http://creativecommons.org/licenses/by/3.0/ A mention of
'Font Awesome - http://fortawesome.github.com/Font-Awesome' in human-readable
source code is considered acceptable attribution (most common on the web).
If human readable source code is not available to the end user, a mention in
an 'About' or 'Credits' screen is considered acceptable (most common in desktop
or mobile software).
Contact
-------------------------------------------------------
Email: dave@davegandy.com
Twitter: http://twitter.com/fortaweso_me
Work: http://lemonwi.se co-founder
*/
@font-face {
font-family: "FontAwesome";
src: url('../fonts/fontawesome-webfont.eot');
src: url('../fonts/fontawesome-webfont.eot?#iefix') format('eot'), url('../fonts/fontawesome-webfont.woff') format('woff'), url('../fonts/fontawesome-webfont.ttf') format('truetype'), url('../font/fontawesome-webfont.svg#FontAwesome') format('svg');
font-weight: normal;
font-style: normal;
}
/* Font Awesome styles
------------------------------------------------------- */
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: FontAwesome;
font-weight: normal;
font-style: normal;
display: inline-block;
text-decoration: inherit;
}
a [class^="icon-"], a [class*=" icon-"] {
display: inline-block;
text-decoration: inherit;
}
/* makes the font 33% larger relative to the icon container */
.icon-large:before {
vertical-align: top;
font-size: 1.3333333333333333em;
}
.btn [class^="icon-"], .btn [class*=" icon-"] {
/* keeps button heights with and without icons the same */
line-height: .9em;
}
li [class^="icon-"], li [class*=" icon-"] {
display: inline-block;
width: 1.25em;
text-align: center;
}
li .icon-large[class^="icon-"], li .icon-large[class*=" icon-"] {
/* 1.5 increased font size for icon-large * 1.25 width */
width: 1.875em;
}
li[class^="icon-"], li[class*=" icon-"] {
margin-left: 0;
list-style-type: none;
}
li[class^="icon-"]:before, li[class*=" icon-"]:before {
text-indent: -2em;
text-align: center;
}
li[class^="icon-"].icon-large:before, li[class*=" icon-"].icon-large:before {
text-indent: -1.3333333333333333em;
}
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
readers do not read off random characters that represent icons */
.icon-glass:before { content: "\f000"; }
.icon-music:before { content: "\f001"; }
.icon-search:before { content: "\f002"; }
.icon-envelope:before { content: "\f003"; }
.icon-heart:before { content: "\f004"; }
.icon-star:before { content: "\f005"; }
.icon-star-empty:before { content: "\f006"; }
.icon-user:before { content: "\f007"; }
.icon-film:before { content: "\f008"; }
.icon-th-large:before { content: "\f009"; }
.icon-th:before { content: "\f00a"; }
.icon-th-list:before { content: "\f00b"; }
.icon-ok:before { content: "\f00c"; }
.icon-remove:before { content: "\f00d"; }
.icon-zoom-in:before { content: "\f00e"; }
.icon-zoom-out:before { content: "\f010"; }
.icon-off:before { content: "\f011"; }
.icon-signal:before { content: "\f012"; }
.icon-cog:before { content: "\f013"; }
.icon-trash:before { content: "\f014"; }
.icon-home:before { content: "\f015"; }
.icon-file:before { content: "\f016"; }
.icon-time:before { content: "\f017"; }
.icon-road:before { content: "\f018"; }
.icon-download-alt:before { content: "\f019"; }
.icon-download:before { content: "\f01a"; }
.icon-upload:before { content: "\f01b"; }
.icon-inbox:before { content: "\f01c"; }
.icon-play-circle:before { content: "\f01d"; }
.icon-repeat:before { content: "\f01e"; }
/* \f020 doesn't work in Safari. all shifted one down */
.icon-refresh:before { content: "\f021"; }
.icon-list-alt:before { content: "\f022"; }
.icon-lock:before { content: "\f023"; }
.icon-flag:before { content: "\f024"; }
.icon-headphones:before { content: "\f025"; }
.icon-volume-off:before { content: "\f026"; }
.icon-volume-down:before { content: "\f027"; }
.icon-volume-up:before { content: "\f028"; }
.icon-qrcode:before { content: "\f029"; }
.icon-barcode:before { content: "\f02a"; }
.icon-tag:before { content: "\f02b"; }
.icon-tags:before { content: "\f02c"; }
.icon-book:before { content: "\f02d"; }
.icon-bookmark:before { content: "\f02e"; }
.icon-print:before { content: "\f02f"; }
.icon-camera:before { content: "\f030"; }
.icon-font:before { content: "\f031"; }
.icon-bold:before { content: "\f032"; }
.icon-italic:before { content: "\f033"; }
.icon-text-height:before { content: "\f034"; }
.icon-text-width:before { content: "\f035"; }
.icon-align-left:before { content: "\f036"; }
.icon-align-center:before { content: "\f037"; }
.icon-align-right:before { content: "\f038"; }
.icon-align-justify:before { content: "\f039"; }
.icon-list:before { content: "\f03a"; }
.icon-indent-left:before { content: "\f03b"; }
.icon-indent-right:before { content: "\f03c"; }
.icon-facetime-video:before { content: "\f03d"; }
.icon-picture:before { content: "\f03e"; }
.icon-pencil:before { content: "\f040"; }
.icon-map-marker:before { content: "\f041"; }
.icon-adjust:before { content: "\f042"; }
.icon-tint:before { content: "\f043"; }
.icon-edit:before { content: "\f044"; }
.icon-share:before { content: "\f045"; }
.icon-check:before { content: "\f046"; }
.icon-move:before { content: "\f047"; }
.icon-step-backward:before { content: "\f048"; }
.icon-fast-backward:before { content: "\f049"; }
.icon-backward:before { content: "\f04a"; }
.icon-play:before { content: "\f04b"; }
.icon-pause:before { content: "\f04c"; }
.icon-stop:before { content: "\f04d"; }
.icon-forward:before { content: "\f04e"; }
.icon-fast-forward:before { content: "\f050"; }
.icon-step-forward:before { content: "\f051"; }
.icon-eject:before { content: "\f052"; }
.icon-chevron-left:before { content: "\f053"; }
.icon-chevron-right:before { content: "\f054"; }
.icon-plus-sign:before { content: "\f055"; }
.icon-minus-sign:before { content: "\f056"; }
.icon-remove-sign:before { content: "\f057"; }
.icon-ok-sign:before { content: "\f058"; }
.icon-question-sign:before { content: "\f059"; }
.icon-info-sign:before { content: "\f05a"; }
.icon-screenshot:before { content: "\f05b"; }
.icon-remove-circle:before { content: "\f05c"; }
.icon-ok-circle:before { content: "\f05d"; }
.icon-ban-circle:before { content: "\f05e"; }
.icon-arrow-left:before { content: "\f060"; }
.icon-arrow-right:before { content: "\f061"; }
.icon-arrow-up:before { content: "\f062"; }
.icon-arrow-down:before { content: "\f063"; }
.icon-share-alt:before { content: "\f064"; }
.icon-resize-full:before { content: "\f065"; }
.icon-resize-small:before { content: "\f066"; }
.icon-plus:before { content: "\f067"; }
.icon-minus:before { content: "\f068"; }
.icon-asterisk:before { content: "\f069"; }
.icon-exclamation-sign:before { content: "\f06a"; }
.icon-gift:before { content: "\f06b"; }
.icon-leaf:before { content: "\f06c"; }
.icon-fire:before { content: "\f06d"; }
.icon-eye-open:before { content: "\f06e"; }
.icon-eye-close:before { content: "\f070"; }
.icon-warning-sign:before { content: "\f071"; }
.icon-plane:before { content: "\f072"; }
.icon-calendar:before { content: "\f073"; }
.icon-random:before { content: "\f074"; }
.icon-comment:before { content: "\f075"; }
.icon-magnet:before { content: "\f076"; }
.icon-chevron-up:before { content: "\f077"; }
.icon-chevron-down:before { content: "\f078"; }
.icon-retweet:before { content: "\f079"; }
.icon-shopping-cart:before { content: "\f07a"; }
.icon-folder-close:before { content: "\f07b"; }
.icon-folder-open:before { content: "\f07c"; }
.icon-resize-vertical:before { content: "\f07d"; }
.icon-resize-horizontal:before { content: "\f07e"; }
.icon-bar-chart:before { content: "\f080"; }
.icon-twitter-sign:before { content: "\f081"; }
.icon-facebook-sign:before { content: "\f082"; }
.icon-camera-retro:before { content: "\f083"; }
.icon-key:before { content: "\f084"; }
.icon-cogs:before { content: "\f085"; }
.icon-comments:before { content: "\f086"; }
.icon-thumbs-up:before { content: "\f087"; }
.icon-thumbs-down:before { content: "\f088"; }
.icon-star-half:before { content: "\f089"; }
.icon-heart-empty:before { content: "\f08a"; }
.icon-signout:before { content: "\f08b"; }
.icon-linkedin-sign:before { content: "\f08c"; }
.icon-pushpin:before { content: "\f08d"; }
.icon-external-link:before { content: "\f08e"; }
.icon-signin:before { content: "\f090"; }
.icon-trophy:before { content: "\f091"; }
.icon-github-sign:before { content: "\f092"; }
.icon-upload-alt:before { content: "\f093"; }
.icon-lemon:before { content: "\f094"; }
.icon-phone:before { content: "\f095"; }
.icon-check-empty:before { content: "\f096"; }
.icon-bookmark-empty:before { content: "\f097"; }
.icon-phone-sign:before { content: "\f098"; }
.icon-twitter:before { content: "\f099"; }
.icon-facebook:before { content: "\f09a"; }
.icon-github:before { content: "\f09b"; }
.icon-unlock:before { content: "\f09c"; }
.icon-credit-card:before { content: "\f09d"; }
.icon-rss:before { content: "\f09e"; }
.icon-hdd:before { content: "\f0a0"; }
.icon-bullhorn:before { content: "\f0a1"; }
.icon-bell:before { content: "\f0a2"; }
.icon-certificate:before { content: "\f0a3"; }
.icon-hand-right:before { content: "\f0a4"; }
.icon-hand-left:before { content: "\f0a5"; }
.icon-hand-up:before { content: "\f0a6"; }
.icon-hand-down:before { content: "\f0a7"; }
.icon-circle-arrow-left:before { content: "\f0a8"; }
.icon-circle-arrow-right:before { content: "\f0a9"; }
.icon-circle-arrow-up:before { content: "\f0aa"; }
.icon-circle-arrow-down:before { content: "\f0ab"; }
.icon-globe:before { content: "\f0ac"; }
.icon-wrench:before { content: "\f0ad"; }
.icon-tasks:before { content: "\f0ae"; }
.icon-filter:before { content: "\f0b0"; }
.icon-briefcase:before { content: "\f0b1"; }
.icon-fullscreen:before { content: "\f0b2"; }
.icon-group:before { content: "\f0c0"; }
.icon-link:before { content: "\f0c1"; }
.icon-cloud:before { content: "\f0c2"; }
.icon-beaker:before { content: "\f0c3"; }
.icon-cut:before { content: "\f0c4"; }
.icon-copy:before { content: "\f0c5"; }
.icon-paper-clip:before { content: "\f0c6"; }
.icon-save:before { content: "\f0c7"; }
.icon-sign-blank:before { content: "\f0c8"; }
.icon-reorder:before { content: "\f0c9"; }
.icon-list-ul:before { content: "\f0ca"; }
.icon-list-ol:before { content: "\f0cb"; }
.icon-strikethrough:before { content: "\f0cc"; }
.icon-underline:before { content: "\f0cd"; }
.icon-table:before { content: "\f0ce"; }
.icon-magic:before { content: "\f0d0"; }
.icon-truck:before { content: "\f0d1"; }
.icon-pinterest:before { content: "\f0d2"; }
.icon-pinterest-sign:before { content: "\f0d3"; }
.icon-google-plus-sign:before { content: "\f0d4"; }
.icon-google-plus:before { content: "\f0d5"; }
.icon-money:before { content: "\f0d6"; }
.icon-caret-down:before { content: "\f0d7"; }
.icon-caret-up:before { content: "\f0d8"; }
.icon-caret-left:before { content: "\f0d9"; }
.icon-caret-right:before { content: "\f0da"; }
.icon-columns:before { content: "\f0db"; }
.icon-sort:before { content: "\f0dc"; }
.icon-sort-down:before { content: "\f0dd"; }
.icon-sort-up:before { content: "\f0de"; }
.icon-envelope-alt:before { content: "\f0e0"; }
.icon-linkedin:before { content: "\f0e1"; }
.icon-undo:before { content: "\f0e2"; }
.icon-legal:before { content: "\f0e3"; }
.icon-dashboard:before { content: "\f0e4"; }
.icon-comment-alt:before { content: "\f0e5"; }
.icon-comments-alt:before { content: "\f0e6"; }
.icon-bolt:before { content: "\f0e7"; }
.icon-sitemap:before { content: "\f0e8"; }
.icon-umbrella:before { content: "\f0e9"; }
.icon-paste:before { content: "\f0ea"; }
.icon-user-md:before { content: "\f200"; }
+519
View File
@@ -0,0 +1,519 @@
/* WARNING: Your are using ligatures for your icon font.
Ligatures are not supported in IE 9 (and older).
Use the Private Use Area encoding for best browser support.
==================================================================== */
@font-face {
font-family: 'entypo';
src:url(<%= asset_path 'entypo.eot' %>);
src:url(<%= asset_path 'entypo.eot?#iefix' %>) format('embedded-opentype'),
url(<%= asset_path 'entypo.svg#entypo' %>) format('svg'),
url(<%= asset_path 'entypo.woff' %>) format('woff'),
url(<%= asset_path 'entypo.ttf' %>) format('truetype');
font-weight: normal;
font-style: normal;
}
/* Use the following CSS code if you want to use data attributes for inserting your icons */
[data-icons]:before {
font-family: 'entypo';
content: attr(data-icon);
speak: none;
/* Enable Ligatures */
-webkit-font-feature-settings:"liga","dlig";
-moz-font-feature-settings:"liga=1, dlig=1";
-moz-font-feature-settings:"liga","dlig";
-ms-font-feature-settings:"liga","dlig";
-o-font-feature-settings:"liga","dlig";
font-feature-settings:"liga","dlig";
text-rendering:optimizeLegibility;
font-weight: normal;
-webkit-font-smoothing: antialiased;
}
/* Use the following CSS code if you want to have a class per icon */
[class^="icons-"]:before, [class*=" icons-"]:before {
font-size: 1.5em;
font-family: 'entypo';
font-style: normal;
speak: none;
/* Enable Ligatures */
-webkit-font-feature-settings:"liga","dlig";
-moz-font-feature-settings:"liga=1, dlig=1";
-moz-font-feature-settings:"liga","dlig";
-ms-font-feature-settings:"liga","dlig";
-o-font-feature-settings:"liga","dlig";
font-feature-settings:"liga","dlig";
text-rendering:optimizeLegibility;
font-weight: normal;
-webkit-font-smoothing: antialiased;
display: inline-block;
text-decoration: inherit;
}
a [class^="icons-"], a [class*=" icons-"] {
display: inline-block;
text-decoration: inherit;
}
/* makes the font 33% larger relative to the icon container */
.icons-large:before {
vertical-align: top;
font-size: 1.3333333333333333em;
}
.btn [class^="icons-"], .btn [class*=" icons-"] {
/* keeps button heights with and without icons the same */
line-height: .9em;
}
li [class^="icons-"], li [class*=" icons-"] {
display: inline-block;
width: 1.25em;
text-align: center;
margin-right: 10px;
}
li .icons-large[class^="icons-"], li .icons-large[class*=" icons-"] {
/* 1.5 increased font size for icons-large * 1.25 width */
width: 1.875em;
}
li[class^="icons-"], li[class*=" icons-"] {
margin-left: 0;
list-style-type: none;
}
li[class^="icons-"]:before, li[class*=" icons-"]:before {
text-indent: -2em;
text-align: center;
}
li[class^="icons-"].icons-large:before, li[class*=" icons-"].icons-large:before {
text-indent: -1.3333333333333333em;
}
.icons-phone:before {
content: "\70\68\6f\6e\65";
}
.icons-directions:before {
content: "\64\69\72\65\63\74\69\6f\6e\73";
}
.icons-mail:before {
content: "\6d\61\69\6c";
}
.icons-pencil:before {
content: "\70\65\6e\63\69\6c";
}
.icons-paperclip:before {
content: "\70\61\70\65\72\63\6c\69\70";
}
.icons-drawer:before {
content: "\64\72\61\77\65\72";
}
.icons-member:before {
content: "\6d\65\6d\62\65\72";
}
.icons-group:before {
content: "\67\72\6f\75\70";
}
.icons-addmember:before {
content: "\61\64\64\6d\65\6d\62\65\72";
}
.icons-location:before {
content: "\6c\6f\63\61\74\69\6f\6e";
}
.icons-share:before {
content: "\73\68\61\72\65";
}
.icons-heart-full:before {
content: "\68\65\61\72\74\2d\66\75\6c\6c";
}
.icons-heart-bare:before {
content: "\68\65\61\72\74\2d\62\61\72\65";
}
.icons-star-full:before {
content: "\73\74\61\72\2d\66\75\6c\6c";
}
.icons-star-bare:before {
content: "\73\74\61\72\2d\62\61\72\65";
}
.icons-discuss:before {
content: "\64\69\73\63\75\73\73";
}
.icons-comment:before {
content: "\63\6f\6d\6d\65\6e\74";
}
.icons-quote:before {
content: "\71\75\6f\74\65";
}
.icons-house:before {
content: "\68\6f\75\73\65";
}
.icons-search:before {
content: "\73\65\61\72\63\68";
}
.icons-printer:before {
content: "\70\72\69\6e\74\65\72";
}
.icons-bell:before {
content: "\62\65\6c\6c";
}
.icons-link:before {
content: "\6c\69\6e\6b";
}
.icons-flag:before {
content: "\66\61\6c\67";
}
.icons-cog:before {
content: "\63\6f\67";
}
.icons-tools:before {
content: "\74\6f\6f\6c\73";
}
.icons-tag:before {
content: "\74\61\67";
}
.icons-camera:before {
content: "\63\61\6d\65\72\61";
}
.icons-megaphone:before {
content: "\6d\65\67\61\70\68\6f\6e\65";
}
.icons-new:before {
content: "\6e\65\77";
}
.icons-graduation:before {
content: "\67\72\61\64\75\61\74\69\6f\6e";
}
.icons-books:before {
content: "\62\6f\6f\6b\73";
}
.icons-page:before {
content: "\70\61\67\65";
}
.icons-lifebuoy:before {
content: "\6c\69\66\65\62\75\6f\79";
}
.icons-eye:before {
content: "\65\79\65";
}
.icons-clock:before {
content: "\63\6c\6f\63\6b";
}
.icons-calendar:before {
content: "\63\61\6c\65\6e\64\61\72";
}
.icons-briefcase:before {
content: "\62\72\69\65\66\63\61\73\65";
}
.icons-gauge:before {
content: "\67\61\75\67\65";
}
.icons-language:before {
content: "\6c\61\6e\67\75\61\67\65";
}
.icons-keys:before {
content: "\6b\65\79\73";
}
.icons-earth:before {
content: "\65\61\72\74\68";
}
.icons-keyboard:before {
content: "\6b\65\79\62\6f\61\72\64";
}
.icons-browser:before {
content: "\62\72\6f\77\73\65\72";
}
.icons-publish:before {
content: "\70\75\62\6c\69\73\68";
}
.icons-code:before {
content: "\63\6f\64\65";
}
.icons-light-bulb:before {
content: "\6c\69\67\68\74\2d\62\75\6c\62";
}
.icons-database:before {
content: "\64\61\74\61\62\61\73\65";
}
.icons-box:before {
content: "\62\6f\78";
}
.icons-rss:before {
content: "\72\73\73";
}
.icons-clipboard:before {
content: "\63\6c\69\70\62\6f\61\72\64";
}
.icons-cart:before {
content: "\63\61\72\74";
}
.icons-untitled:before {
content: "\75\6e\74\69\74\6c\65\64";
}
.icons-statistics:before {
content: "\73\74\61\74\69\73\74\69\63\73";
}
.icons-pie:before {
content: "\70\69\65";
}
.icons-bars:before {
content: "\62\61\72\73";
}
.icons-graph:before {
content: "\67\72\61\70\68";
}
.icons-lock:before {
content: "\6c\6f\63\6b";
}
.icons-unlock:before {
content: "\75\6e\6c\6f\63\6b";
}
.icons-outlog:before {
content: "\6f\75\74\6c\6f\67";
}
.icons-inlog:before {
content: "\69\6e\6c\6f\67";
}
.icons-checkmark:before {
content: "\63\68\65\63\6b\6d\61\72\6b";
}
.icons-aminus:before {
content: "\61\6d\69\6e\75\73";
}
.icons-aplus:before {
content: "\61\70\6c\75\73";
}
.icons-aclose:before {
content: "\61\63\6c\6f\73\65";
}
.icons-bminus:before {
content: "\62\6d\69\6e\75\73";
}
.icons-bplus:before {
content: "\62\70\6c\75\73";
}
.icons-bclose:before {
content: "\62\63\6c\6f\73\65";
}
.icons-cminus:before {
content: "\63\6d\69\6e\75\73";
}
.icons-cplus:before {
content: "\63\70\6c\75\73";
}
.icons-cross:before {
content: "\63\72\6f\73\73";
}
.icons-blocked:before {
content: "\62\6c\6f\63\6b\65\64";
}
.icons-information:before {
content: "\69\6e\66\6f\72\6d\61\74\69\6f\6e";
}
.icons-binfo:before {
content: "\62\69\6e\66\6f";
}
.icons-question:before {
content: "\71\75\65\73\74\69\6f\6e";
}
.icons-help:before {
content: "\68\65\6c\70";
}
.icons-warning:before {
content: "\77\61\72\6e\69\6e\67";
}
.icons-shuffle:before {
content: "\73\68\75\66\66\6c\65";
}
.icons-return:before {
content: "\72\65\74\75\72\6e";
}
.icons-enter:before {
content: "\65\6e\74\65\72";
}
.icons-exchange:before {
content: "\65\78\63\68\61\6e\67\65";
}
.icons-loop:before {
content: "\6c\6f\6f\70";
}
.icons-th-list:before {
content: "\74\68\2d\6c\69\73\74";
}
.icons-th-large:before {
content: "\74\68\2d\6c\61\72\67\65";
}
.icons-align-justify:before {
content: "\61\6c\69\67\6e\2d\6a\75\73\74\69\66\79";
}
.icons-wtext:before {
content: "\77\74\65\78\74";
}
.icons-btext:before {
content: "\62\74\65\78\74";
}
.icons-pictures:before {
content: "\70\69\63\74\75\72\65";
}
.icons-video:before {
content: "\76\69\64\65\6f";
}
.icons-music:before {
content: "\6d\6f\75\73\65";
}
.icons-folder:before {
content: "\66\6f\6c\64\65\72";
}
.icons-archive:before {
content: "\61\72\63\68\69\76\65";
}
.icons-trash:before {
content: "\74\72\61\73\68";
}
.icons-upload:before {
content: "\75\70\6c\6f\61\64";
}
.icons-download:before {
content: "\64\6f\77\6e\6c\6f\61\64";
}
.icons-disk:before {
content: "\64\69\73\6b";
}
.icons-bookmark:before {
content: "\62\6f\6f\6b\6d\61\72\6b";
}
.icons-booma:before {
content: "\62\6f\6f\6d\61";
}
.icons-resize-enlarge:before {
content: "\72\65\73\69\7a\65\2d\65\6e\6c\61\72\67\65";
}
.icons-resize-shrink:before {
content: "\72\65\73\69\7a\65\2d\73\68\72\69\6e\6b";
}
.icons-flow-tree:before {
content: "\66\6c\6f\77\2d\74\72\65\65";
}
.icons-arrow-left-a:before {
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\61";
}
.icons-arrow-bottom-a:before {
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\61";
}
.icons-arrow-top-a:before {
content: "\61\72\72\6f\77\2d\74\6f\70\2d\61";
}
.icons-arrow-right-a:before {
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\61";
}
.icons-arrow-left-b:before {
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\62";
}
.icons-arrow-bottom-b:before {
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\62";
}
.icons-arrow-top-b:before {
content: "\61\72\72\6f\77\2d\74\6f\70\2d\62";
}
.icons-arrow-right-b:before {
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\62";
}
.icons-arrow-left-c:before {
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\63";
}
.icons-arrow-bottom-c:before {
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\63";
}
.icons-arrow-top-c:before {
content: "\61\72\72\6f\77\2d\74\6f\70\2d\63";
}
.icons-arrow-right-c:before {
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\63";
}
.icons-arrow-left-d:before {
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\64";
}
.icons-arrow-bottom-d:before {
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\64";
}
.icons-arrow-top-d:before {
content: "\61\72\72\6f\77\2d\74\6f\70\2d\64";
}
.icons-arrow-right-d:before {
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\64";
}
.icons-arrow-left-e:before {
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\65";
}
.icons-arrow-bottom-e:before {
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\65";
}
.icons-arrow-top-e:before {
content: "\61\72\72\6f\77\2d\74\6f\70\2d\65";
}
.icons-arrow-right-e:before {
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\65";
}
.icons-arrow-left-f:before {
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\66";
}
.icons-arrow-bottom-f:before {
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\66";
}
.icons-arrow-top-f:before {
content: "\61\72\72\6f\77\2d\74\6f\70\2d\66";
}
.icons-left-f:before {
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\66";
}
.icons-menu:before {
content: "\6d\65\6e\75";
}
.icons-ellipsis:before {
content: "\65\6c\6c\69\70\73\69\73";
}
.icons-dots:before {
content: "\64\6f\74\73";
}
.icons-dot:before {
content: "\64\6f\74";
}
.icons-like:before {
content: "\6c\69\6b\65";
}
.icons-suck:before {
content: "\73\75\63\6b";
}
.icons-export:before {
content: "\65\78\70\6f\72\74";
}
.icons-vcard:before {
content: "\76\63\61\72\64";
}
.icons-flow-cascade:before {
content: "\21";
}
.icons-landscape:before {
content: "\22";
}
.icons-brush:before {
content: "\62\72\75\73\68";
}
.icons-palette:before {
content: "\70\61\6c\65\74\74\65";
}
.icons-desktop:before {
content: "\64\65\73\6b\74\6f\70";
}
.icons-plane:before {
content: "\70\6c\61\6e\65";
}
.icons-booklet:before {
content: "\62\6f\6f\6b\6c\65\74";
}
.icons-update:before {
content: "\75\70\64\61\74\65";
}
.icons-reload:before {
content: "\72\65\6c\6f\61\64";
}
.icons-unload:before {
content: "\75\6e\6c\6f\61\64";
}
.icons-trophy:before {
content: "\74\72\6f\70\68\79";
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,374 @@
a {
text-decoration: none;
}
div[data-role="page"] {
padding-bottom: 0!important;
}
.clear:after {
clear: both;
content: "";
display: block;
height: 0;
visibility: hidden;
}
.main-menu {
display: block;
position: fixed;
width: 100%;
left: 0;
top: -50px;
display: block;
z-index: 49;
-webkit-transition: all 0.3s linear;
-moz-transition: all 0.3s linear;
-ms-transition: all 0.3s linear;
-o-transition: all 0.3s linear;
transition: all 0.3s linear;
}
.main-menu.expanded {
top: 50px;
-webkit-transition: all 0.3s linear;
-moz-transition: all 0.3s linear;
-ms-transition: all 0.3s linear;
-o-transition: all 0.3s linear;
transition: all 0.3s linear;
}
.main-menu ul {
background-color: #333;
width: 210px;
list-style: none;
margin: 0 auto;
padding: 0;
-webkit-box-shadow: 0 3px 10px rgba(0,0,0,.8), inset 0 3px 15px rgba(0,0,0,.3);;
-webkit-border-radius: 0 0 10px 10px;
}
.main-menu ul li {
float: left;
width: 58px;
border-right: 1px solid #292929;
border-left: 1px solid #3F3F3F;
padding: 0 5px;
}
.main-menu ul li:last-child {
-webkit-border-radius: 0 0 10px 0;
border-right-color: transparent;
}
.main-menu ul li:first-child {
-webkit-border-radius: 0 0 0 10px;
border-left-color: transparent;
}
.main-menu ul li:hover {
background-color: #b4111a;
}
.main-menu ul i {
font-size: 1.4em;
width: 100%;
display: block;
margin: 10px auto 0;
}
.main-menu ul span {
display: block;
margin-bottom: 10px;
text-align: center;
}
.main-menu ul li a:link, .main-menu ul li a:visited {
font-size: .6em;
color: #DFDFDF!important;
text-shadow: 0 -1px 0px #000;
text-decoration: none;
display: block;
}
.main-menu ul li a:hover, .main-menu ul li a:active {
color: #DFDFDF!important;
}
.global {
position: relative;
background-color: #333;
overflow-x: hidden;
width: 100%;
-webkit-box-shadow: -3px 0px 15px rgba(0,0,0,.5);
padding-top: 50px;
padding-bottom: 64px;
/*margin-bottom: -64px;*/
}
.header {
position: fixed;
top: 0;
left: 0;
right: 0;
background-color: #000;
padding: 0;
border: none;
z-index: 50;
/*background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#545b60), to(#191a1c));*/
background-image: -webkit-linear-gradient(top, #5282A6, #133757);
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(127, 149, 165, 1), 0 -1px 0 rgba(31, 32, 36, 1) inset;
}
.header h1.ui-title {
margin: 8px 30%;
position: relative;
}
.header i.openmenu {
position: absolute;
display: block;
top: 40px;
left: 50%;
margin-left: -15px;
font-size: 20px;
/*color: #727272;*/
color: #7CA6C5;
/*background-color: #252525;*/
background-color: #144366;
border-radius: 0 0 5px 5px;
height: 15px;
line-height: 16px;
box-shadow: 1px 2px 2px rgba(0, 0, 0, .5);
}
.header .language .ui-btn-text {
left: 0;
}
.header .language .ui-btn-text i {
font-size: 1.1em;
margin-top: .33em;
}
.header .language .ui-icon {
background-image: none;
}
.header .ui-btn-up-a {
border: 1px solid #133547;
background-color: #0C4C64;
background-image: -webkit-gradient(linear, left top, left bottom, from( #0D6691 ), to( #0E3A4B ));
background-image: -webkit-linear-gradient( #0D6691 , #0E3A4B );
background-image: -moz-linear-gradient( #0D6691 , #0E3A4B );
background-image: -ms-linear-gradient( #0D6691 , #0E3A4B );
background-image: -o-linear-gradient( #0D6691 , #0E3A4B );
background-image: linear-gradient( #0D6691 , #0E3A4B );
}
.header h1 img {
height: 30px;
width: auto;
}
.header.ui-header > .ui-btn {
margin-top: 6px;
}
.content {
position: relative;
background-color: #FFF;
min-height: 330px;
background: url(<%= asset_path "mobile/newlist-bg.jpg" %>) repeat 0 0 transparent;
}
/*.content .list {
position: relative;
z-index: 5;
box-shadow: -5px 0px 15px rgba(0,0,0,.8)
}*/
.content .newlist {
margin: 0 auto;
padding: 10px;
}
.content .newitem {
display: inline-block;
float: left;
width: 280px;
min-height: 490px;
max-height: 490px;
background-color: #FFFFFF;
padding: 10px;
margin: 0 10px 10px 0;
box-shadow: 0px 3px 5px rgba(0,0,0,.1);
}
#index .content .newpic {
width: 280px;
height: 200px;
margin: 0 auto;
}
#index .content .newstitle {
font-size: 1.4em;
margin: 1em 0;
}
#index .content .newsDate {
font-size: 1em;
color: #8D8D8D;
}
#index .content .newsummary {
padding: 0 0 20px;
margin-bottom: 0;
}
#announcement_content .content .newpic {
width: 320px;
height: 220px;
margin: 0 auto;
}
#announcement_content .content .newstitle {
font-size: 1.4em;
padding: 0 10px;
margin: 1em 0;
}
#announcement_content .content .newsDate {
padding: 0 10px;
font-size: 1em;
color: #8D8D8D;
}
#announcement_content .content .newsummary {
padding: 0 10px 20px;
margin-bottom: 0;
}
#announcement_content .content {
padding: 10px;
}
#map div[data-role="content"] {
padding: 0;
}
#map .global {
padding: 0;
}
#page_content .global {
overflow-x: auto;
-webkit-box-shadow: none;
background-color: #f9f9f9;
}
#page_content .content {
background-image: none;
padding: 10px;
background-color: #f9f9f9;
}
#page_content .content .newsummary > * {
width: 750px!important;
}
#page_content .content .newsummary > *:after {
clear: both;
height: 0;
display: block;
content: "";
visibility: hidden;
}
div[id^="dialog"] .global {
padding: 0;
}
div[id^="dialog"] .content {
padding: 10px;
height: auto!important;
min-height: 70px;
}
/*.content .newitem:first-child {
margin-left: 0;
}
.content .newitem:last-child {
margin-right: 0;
}*/
.pagination {
height: 36px;
margin: 18px 0 0;
padding-bottom: 18px;
text-align: center;
}
.pagination ul {
padding: 0;
display: inline-block;
margin-left: 0;
margin: 0;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,0.05);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.pagination li {
display: inline;
}
.pagination li:first-child a {
border-left-width: 1px;
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
.pagination li:last-child a {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
.pagination .active a {
color: #999;
cursor: default;
}
.pagination a:hover, .pagination .active a {
background-color: #E8E8E8;
}
.pagination a {
background-color: white;
}
.pagination a {
float: left;
padding: 0 10px;
line-height: 30px;
text-decoration: none;
border: 1px solid #DDD;
border-left-width: 0;
font-size: .8em;
}
.footer {
color: #999;
/*background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#545b60), to(#191a1c));*/
background-image: -webkit-linear-gradient(top, #5282A6, #133757);
}
.footer div[data-role="navbar"] i {
display: block;
width: 100%;
margin-bottom: 5px;
}
@media(min-width:320px){
}
@media(min-width: 480px){
.content .newitem {
width: 440px;
}
}
@media(min-width:600px) {
.main-menu ul {
width: 420px;
}
.main-menu ul li {
width: 128px;
}
}
@media(min-width:768px) {
.main-menu ul {
width: 480px;
}
.main-menu ul li {
width: 148px;
}
.content .newitem {
width: 280px;
}
}
@media(min-width:800px) {
.main-menu ul {
width: 480px;
}
.main-menu ul li {
width: 148px;
}
}
@media(min-width:961px) {
.main-menu ul {
width: 480px;
}
.main-menu ul li {
width: 148px;
}
}
@media(min-width: 1024px) {
.main-menu ul {
width: 600px;
}
.main-menu ul li {
width: 188px;
}
.content .newitem {
width: 280px;
}
}
@media(min-width:1280px) {
}
@@ -223,7 +223,7 @@
#orbit-bar {
margin: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-family: "Chivo";
font-size: 12px;
line-height: 20px;
color: #333333;
+18 -32
View File
@@ -1,20 +1,10 @@
class Admin::AdBannersController < OrbitBackendController
open_for_visitor :only => [:index, :show]
open_for_sub_manager
before_filter :force_order_for_visitor,:only=>[:index, :show]
before_filter :force_order_for_user,:except => [:index, :show]
before_filter :for_app_sub_manager,:except => [:index, :show]
before_filter :for_app_manager,:except => [:index,:show,:update,:realtime_preview]
def rename
@ad_banner = AdBanner.find(params[:id])
@ad_banner.title = params[:body]
render :json => {:success =>@ad_banner.save!}
end
def destroy
@ad_banner = AdBanner.find(params[:id])
@ad_banner.destroy
redirect_to admin_ad_banners_url
def index
@ad_banners = AdBanner.all.page(params[:page]).per(10)
end
def show
@@ -31,35 +21,31 @@ class Admin::AdBannersController < OrbitBackendController
def create
@ad_banner = AdBanner.new(params[:ad_banner])
if @ad_banner.save
@active = @ad_banner
redirect_to admin_ad_banners_url
#respond_to do |format|
# format.js {render 'new_created_node'}
#end
else
render 'create_error_msg'
@ad_banner = AdBanner.new(params[:ad_banner])
render :new
end
end
def edit
@ad_banner = AdBanner.find(params[:id])
render layout: false
end
def update
@ad_banner = AdBanner.find(params[:id])
@ad_banner.update_attributes(params[:ad_banner])
@ad_banner.save
if @ad_banner.update_attributes(params[:ad_banner])
redirect_to admin_ad_banners_url, :status => 303
else
render :edit
end
end
def destroy
@ad_banner = AdBanner.find(params[:id])
@ad_banner.destroy
redirect_to admin_ad_banners_url
end
def realtime_preview
@ad_banner = AdBanner.find( params[:id] ).preview_clone
@ad_banner.update_attributes(params[:ad_banner])#.update_attributes(params[:ad_images])
end
def index
@ad_banners = AdBanner.all
@active = @ad_banners.first
end
end
Loaded 100 of 769 files, more files were not shown because too many files have changed in this diff. Show more