整理bootstrape样式
This commit is contained in:
commit
12d1e2ab09
106
.idea/uask.iml
106
.idea/uask.iml
|
@ -10,39 +10,14 @@
|
|||
</facet>
|
||||
</component>
|
||||
<component name="ModuleRunConfigurationManager">
|
||||
<configuration default="false" name="test: uask" type="RakeRunConfigurationType" factoryName="Rake">
|
||||
<configuration default="false" name="Development: uask" type="RailsRunConfigurationType" factoryName="Rails">
|
||||
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
|
||||
<module name="uask" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||
<envs>
|
||||
<env name="RAILS_ENV" value="test" />
|
||||
</envs>
|
||||
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||
<COVERAGE_PATTERN ENABLED="true">
|
||||
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||
</COVERAGE_PATTERN>
|
||||
</EXTENSION>
|
||||
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="false" name="spec: uask" type="RakeRunConfigurationType" factoryName="Rake">
|
||||
<module name="uask" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||
<envs />
|
||||
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||
|
@ -52,12 +27,13 @@
|
|||
</COVERAGE_PATTERN>
|
||||
</EXTENSION>
|
||||
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="spec" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":rspec " />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="false" name="Production: uask" type="RailsRunConfigurationType" factoryName="Rails">
|
||||
|
@ -86,14 +62,13 @@
|
|||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="false" name="Development: uask" type="RailsRunConfigurationType" factoryName="Rails">
|
||||
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
|
||||
<configuration default="false" name="spec: uask" type="RakeRunConfigurationType" factoryName="Rake">
|
||||
<module name="uask" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||
<envs />
|
||||
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||
|
@ -103,13 +78,38 @@
|
|||
</COVERAGE_PATTERN>
|
||||
</EXTENSION>
|
||||
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="spec" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":rspec " />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="false" name="test: uask" type="RakeRunConfigurationType" factoryName="Rake">
|
||||
<module name="uask" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||
<envs>
|
||||
<env name="RAILS_ENV" value="test" />
|
||||
</envs>
|
||||
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||
<COVERAGE_PATTERN ENABLED="true">
|
||||
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||
</COVERAGE_PATTERN>
|
||||
</EXTENSION>
|
||||
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
||||
|
@ -133,7 +133,9 @@
|
|||
<orderEntry type="library" scope="PROVIDED" name="activesupport (v4.2.8, RVM: ruby-2.3.0) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="ansi (v1.5.0, RVM: ruby-2.3.0) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="arel (v6.0.4, RVM: ruby-2.3.0) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="autoprefixer-rails (v7.1.6, RVM: ruby-2.3.0) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="bcrypt (v3.1.7, RVM: ruby-2.3.0) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="bootstrap-sass (v3.3.7, RVM: ruby-2.3.0) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="bootstrap-will_paginate (v0.0.10, RVM: ruby-2.3.0) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.3, RVM: ruby-2.3.0) [gem]" level="application" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.16.0, RVM: ruby-2.3.0) [gem]" level="application" />
|
||||
|
|
|
@ -1,823 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="f57087e3-40c2-4c74-9556-023e7c947f41" name="Default" comment="" />
|
||||
<ignored path="uask.iws" />
|
||||
<ignored path=".idea/workspace.xml" />
|
||||
<ignored path="$PROJECT_DIR$/components/" />
|
||||
<ignored path="$PROJECT_DIR$/public/system/" />
|
||||
<ignored path="$PROJECT_DIR$/tmp/" />
|
||||
<ignored path=".idea/dataSources.local.xml" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="TRACKING_ENABLED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
|
||||
<component name="CoverageDataManager">
|
||||
<SUITE FILE_PATH="coverage/uask@Development__uask.coverage" NAME="Development: uask Coverage Results" MODIFIED="1519882978823" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="uask" />
|
||||
</component>
|
||||
<component name="CreatePatchCommitExecutor">
|
||||
<option name="PATCH_PATH" value="" />
|
||||
</component>
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
||||
<component name="FavoritesManager">
|
||||
<favorites_list name="uask" />
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf>
|
||||
<file leaf-file-name="questions_controller.rb" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/questions_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="1.5404531">
|
||||
<caret line="56" column="13" selection-start-line="56" selection-start-column="13" selection-end-line="56" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="CHANGED_PATHS">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/db/schema.rb" />
|
||||
<option value="$PROJECT_DIR$/app/controllers/application_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/app/assets/javascripts/application.js" />
|
||||
<option value="$PROJECT_DIR$/config/application.rb" />
|
||||
<option value="$PROJECT_DIR$/config/environments/production.rb" />
|
||||
<option value="$PROJECT_DIR$/app/assets/stylesheets/public.css.scss" />
|
||||
<option value="$PROJECT_DIR$/app/assets/stylesheets/bootstrap.css.scss" />
|
||||
<option value="$PROJECT_DIR$/test/fixtures/users.yml" />
|
||||
<option value="$PROJECT_DIR$/test/test_helper.rb" />
|
||||
<option value="$PROJECT_DIR$/test/integration/users_signup_test.rb" />
|
||||
<option value="$PROJECT_DIR$/test/controllers/welcomes_controller_test.rb" />
|
||||
<option value="$PROJECT_DIR$/test/models/user_test.rb" />
|
||||
<option value="$PROJECT_DIR$/test/integration/users_login_test.rb" />
|
||||
<option value="$PROJECT_DIR$/app/controllers/sessions_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/app/helpers/sessions_helper.rb" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20180204085651_add_admin_to_users.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/users/index.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/users/_user.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/users/edit.html.erb" />
|
||||
<option value="$PROJECT_DIR$/config/routes.rb" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20180206065942_add_activation_to_users.rb" />
|
||||
<option value="$PROJECT_DIR$/app/mailers/user_mailer.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/user_mailer/account_activation.text.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/user_mailer/account_activation.html.erb" />
|
||||
<option value="$PROJECT_DIR$/config/environments/development.rb" />
|
||||
<option value="$PROJECT_DIR$/config/environments/test.rb" />
|
||||
<option value="$PROJECT_DIR$/test/mailers/user_mailer_test.rb" />
|
||||
<option value="$PROJECT_DIR$/test/mailers/previews/user_mailer_preview.rb" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20180226141108_create_questions.rb" />
|
||||
<option value="$PROJECT_DIR$/app/models/user.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/questions/_question.html.erb" />
|
||||
<option value="$PROJECT_DIR$/db/seeds.rb" />
|
||||
<option value="$PROJECT_DIR$/app/models/question.rb" />
|
||||
<option value="$PROJECT_DIR$/db/migrate/20180226144108_create_questions.rb" />
|
||||
<option value="$PROJECT_DIR$/Gemfile" />
|
||||
<option value="$PROJECT_DIR$/app/views/questions/_form.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/questions/index.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/controllers/questions_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/app/helpers/application_helper.rb" />
|
||||
<option value="$PROJECT_DIR$/app/controllers/users_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/app/views/sessions/new.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/views/users/new.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/assets/stylesheets/public.scss" />
|
||||
<option value="$PROJECT_DIR$/app/views/layouts/_header.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/assets/stylesheets/application.css.scss" />
|
||||
<option value="$PROJECT_DIR$/app/controllers/jobs_controller.rb" />
|
||||
<option value="$PROJECT_DIR$/Gemfile.lock" />
|
||||
<option value="$PROJECT_DIR$/config/database.yml" />
|
||||
<option value="$PROJECT_DIR$/.gitignore" />
|
||||
<option value="$PROJECT_DIR$/app/views/layouts/_footer.html.erb" />
|
||||
<option value="$PROJECT_DIR$/app/assets/stylesheets/custom.css.scss" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="JsBuildToolGruntFileManager" detection-done="true" />
|
||||
<component name="JsGulpfileManager">
|
||||
<detection-done>true</detection-done>
|
||||
</component>
|
||||
<component name="LogFilters">
|
||||
<option name="FILTER_ERRORS" value="false" />
|
||||
<option name="FILTER_WARNINGS" value="false" />
|
||||
<option name="FILTER_INFO" value="true" />
|
||||
<option name="FILTER_DEBUG" value="true" />
|
||||
<option name="CUSTOM_FILTER" />
|
||||
</component>
|
||||
<component name="NamedScopeManager">
|
||||
<order />
|
||||
</component>
|
||||
<component name="ProjectFrameBounds">
|
||||
<option name="x" value="67" />
|
||||
<option name="y" value="24" />
|
||||
<option name="width" value="1533" />
|
||||
<option name="height" value="876" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||
<OptionsSetting value="true" id="Add" />
|
||||
<OptionsSetting value="true" id="Remove" />
|
||||
<OptionsSetting value="true" id="Checkout" />
|
||||
<OptionsSetting value="true" id="Update" />
|
||||
<OptionsSetting value="true" id="Status" />
|
||||
<OptionsSetting value="true" id="Edit" />
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectView">
|
||||
<navigator currentView="ProjectPane" proportions="" version="1">
|
||||
<flattenPackages />
|
||||
<showMembers />
|
||||
<showModules />
|
||||
<showLibraryContents />
|
||||
<hideEmptyPackages />
|
||||
<abbreviatePackageNames />
|
||||
<autoscrollToSource />
|
||||
<autoscrollFromSource />
|
||||
<sortByType />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="uask" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="uask" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="uask" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="uask" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="uask" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="app" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="uask" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="uask" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="app" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="assets" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="RailsProjectView" />
|
||||
<pane id="Scope" />
|
||||
<pane id="Scratches" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="settings.editor.selected.configurable" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
|
||||
<property name="settings.editor.splitter.proportion" value="0.2" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="last_opened_file_path" value="$USER_HOME$/sfm" />
|
||||
<property name="recentsLimit" value="5" />
|
||||
<property name="byebug.present.asked" value="true" />
|
||||
<property name="Ruby.ViewRefParam.DefaultExtension" value="html.erb" />
|
||||
<property name="FullScreen" value="false" />
|
||||
</component>
|
||||
<component name="RunManager" selected="Rails.Development: uask">
|
||||
<configuration default="true" type="CucumberRunConfigurationType" factoryName="Cucumber">
|
||||
<predefined_log_file id="RUBY_CUCUMBER" enabled="true" />
|
||||
<module name="" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||
<envs />
|
||||
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||
<COVERAGE_PATTERN ENABLED="true">
|
||||
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||
</COVERAGE_PATTERN>
|
||||
</EXTENSION>
|
||||
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*.feature" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TAGS_FILTER" VALUE="" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_NAME_FILTER" VALUE="" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_ARGS" VALUE="--color -r features" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="VERBOSE_OPTION" VALUE="false" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_RUNNER_PATH" VALUE="" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_RUNNER" VALUE="false" />
|
||||
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SETTINGS_VERSION" VALUE="2" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
|
||||
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
||||
<module name="" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||
<envs />
|
||||
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||
<COVERAGE_PATTERN ENABLED="true">
|
||||
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||
</COVERAGE_PATTERN>
|
||||
</EXTENSION>
|
||||
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
||||
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="RailsRunConfigurationType" factoryName="Rails">
|
||||
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
|
||||
<module name="" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||
<envs />
|
||||
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||
<COVERAGE_PATTERN ENABLED="true">
|
||||
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||
</COVERAGE_PATTERN>
|
||||
</EXTENSION>
|
||||
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
|
||||
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="RakeRunConfigurationType" factoryName="Rake">
|
||||
<module name="" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||
<envs />
|
||||
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||
<COVERAGE_PATTERN ENABLED="true">
|
||||
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||
</COVERAGE_PATTERN>
|
||||
</EXTENSION>
|
||||
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE="" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
|
||||
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
|
||||
<module name="" />
|
||||
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
|
||||
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
||||
<envs />
|
||||
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||
<COVERAGE_PATTERN ENABLED="true">
|
||||
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||
</COVERAGE_PATTERN>
|
||||
</EXTENSION>
|
||||
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
||||
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
|
||||
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
|
||||
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
|
||||
<module name="" />
|
||||
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
||||
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
||||
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
||||
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
||||
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
||||
<envs />
|
||||
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
||||
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
||||
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
||||
<COVERAGE_PATTERN ENABLED="true">
|
||||
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
||||
</COVERAGE_PATTERN>
|
||||
</EXTENSION>
|
||||
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
||||
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
||||
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
||||
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
|
||||
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
||||
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
||||
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
||||
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
||||
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
||||
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
|
||||
<node-options />
|
||||
<gulpfile />
|
||||
<tasks />
|
||||
<arguments />
|
||||
<pass-parent-envs>true</pass-parent-envs>
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<list size="4">
|
||||
<item index="0" class="java.lang.String" itemvalue="Rake.test: uask" />
|
||||
<item index="1" class="java.lang.String" itemvalue="Rake.spec: uask" />
|
||||
<item index="2" class="java.lang.String" itemvalue="Rails.Production: uask" />
|
||||
<item index="3" class="java.lang.String" itemvalue="Rails.Development: uask" />
|
||||
</list>
|
||||
</component>
|
||||
<component name="ShelveChangesManager" show_recycled="false" />
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="f57087e3-40c2-4c74-9556-023e7c947f41" name="Default" comment="" />
|
||||
<created>1516600658536</created>
|
||||
<option name="number" value="Default" />
|
||||
<updated>1516600658536</updated>
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TodoView">
|
||||
<todo-panel id="selected-file">
|
||||
<is-autoscroll-to-source value="true" />
|
||||
</todo-panel>
|
||||
<todo-panel id="all">
|
||||
<are-packages-shown value="true" />
|
||||
<is-autoscroll-to-source value="true" />
|
||||
</todo-panel>
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="67" y="24" width="1533" height="876" extended-state="6" />
|
||||
<editor active="false" />
|
||||
<layout>
|
||||
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.19367854" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32919255" sideWeight="0.49764627" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32919255" sideWeight="0.5023537" order="8" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32907802" sideWeight="0.49358425" order="10" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.16770187" sideWeight="0.49358425" order="11" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.19503106" sideWeight="0.70073974" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.37018633" sideWeight="0.47679892" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.5565217" sideWeight="0.48143712" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
</layout>
|
||||
</component>
|
||||
<component name="Vcs.Log.UiProperties">
|
||||
<option name="RECENTLY_FILTERED_USER_GROUPS">
|
||||
<collection />
|
||||
</option>
|
||||
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
|
||||
<collection />
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsContentAnnotationSettings">
|
||||
<option name="myLimit" value="2678400000" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
<option name="time" value="10" />
|
||||
</breakpoint-manager>
|
||||
<watches-manager>
|
||||
<configuration name="RailsRunConfigurationType">
|
||||
<watch expression="type" language="ruby" />
|
||||
<watch expression="menu" language="ruby" />
|
||||
</configuration>
|
||||
</watches-manager>
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/config/environment.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/config/environments/development.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="13" column="50" selection-start-line="13" selection-start-column="50" selection-end-line="13" selection-end-column="50" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/test/mailers/previews/user_mailer_preview.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="17" column="3" selection-start-line="17" selection-start-column="3" selection-end-line="17" selection-end-column="3" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db/seeds.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="16" column="26" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/questions/_question.json.jbuilder">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/questions/_question.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-1.2659575">
|
||||
<caret line="7" column="5" selection-start-line="7" selection-start-column="5" selection-end-line="7" selection-end-column="5" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/db/migrate/20180226144108_create_questions.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="12" column="0" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/config/locales/en.yml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/user.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="30" column="30" selection-start-line="30" selection-start-column="30" selection-end-line="30" selection-end-column="30" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/application_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="5" column="0" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/images/welcome/wel_1.jpg">
|
||||
<provider selected="true" editor-type-id="images">
|
||||
<state />
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/account_activations_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/questions/edit.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-1.3076923">
|
||||
<caret line="2" column="14" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/questions/_form.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-0.0">
|
||||
<caret line="0" column="9" selection-start-line="0" selection-start-column="9" selection-end-line="0" selection-end-column="9" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/questions/new.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.06390978">
|
||||
<caret line="2" column="14" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/models/question.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="6" selection-start-line="0" selection-start-column="6" selection-end-line="0" selection-end-column="6" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$USER_HOME$/.rvm/gems/ruby-2.3.0/gems/actionview-4.2.8/lib/action_view/helpers/asset_tag_helper.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.516129">
|
||||
<caret line="201" column="49" selection-start-line="201" selection-start-column="39" selection-end-line="201" selection-end-column="49" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/questions/index.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-8.692307">
|
||||
<caret line="19" column="34" selection-start-line="19" selection-start-column="34" selection-end-line="19" selection-end-column="34" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/sessions_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="11" column="32" selection-start-line="11" selection-start-column="28" selection-end-line="11" selection-end-column="32" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/helpers/application_helper.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.23835126">
|
||||
<caret line="11" column="18" selection-start-line="11" selection-start-column="18" selection-end-line="11" selection-end-column="18" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/config/routes.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="3" column="20" selection-start-line="3" selection-start-column="20" selection-end-line="3" selection-end-column="20" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/sessions/new.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-14.384615">
|
||||
<caret line="22" column="53" selection-start-line="22" selection-start-column="53" selection-end-line="22" selection-end-column="53" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/users_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="11" column="9" selection-start-line="11" selection-start-column="2" selection-end-line="11" selection-end-column="9" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/users/new.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="94" column="5" selection-start-line="94" selection-start-column="5" selection-end-line="94" selection-end-column="5" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/layouts/application.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="15" column="7" selection-start-line="15" selection-start-column="7" selection-end-line="15" selection-end-column="7" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/layouts/_header.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="35" column="21" selection-start-line="35" selection-start-column="21" selection-end-line="35" selection-end-column="21" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/jobs_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="18" column="5" selection-start-line="18" selection-start-column="5" selection-end-line="18" selection-end-column="5" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/bin/rails">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="7" column="0" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/config/boot.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="2" column="0" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Gemfile">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="10" column="38" selection-start-line="10" selection-start-column="38" selection-end-line="10" selection-end-column="38" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/Gemfile.lock">
|
||||
<provider editor-type-id="com.intellij.database.editor.CsvTableFileEditorProvider">
|
||||
<state />
|
||||
</provider>
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-145.87097">
|
||||
<caret line="357" column="0" selection-start-line="357" selection-start-column="0" selection-end-line="357" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/config/database.yml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="52" column="16" selection-start-line="52" selection-start-column="16" selection-end-line="52" selection-end-column="16" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/.gitignore">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="15" column="0" selection-start-line="15" selection-start-column="0" selection-end-line="15" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/body-content.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/bootsnav.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/bootstrap-markdown.min.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/bootstrap-theme.min.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/welcomes.scss">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/public.scss">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.8985314">
|
||||
<caret line="168" column="0" selection-start-line="168" selection-start-column="0" selection-end-line="168" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/ques_ask.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-12.863226">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/bootstrap.scss">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/images/favicon.ico">
|
||||
<provider selected="true" editor-type-id="images">
|
||||
<state />
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/images/logo.svg">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/images/zhihu.svg">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/javascripts/application.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/views/layouts/_footer.html.erb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="18" selection-start-line="0" selection-start-column="18" selection-end-line="0" selection-end-column="18" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/application.css.scss">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.34045395">
|
||||
<caret line="15" column="0" selection-start-line="15" selection-start-column="0" selection-end-line="15" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/sessions.scss">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/custom.css.scss">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.30995792">
|
||||
<caret line="85" column="21" selection-start-line="85" selection-start-column="21" selection-end-line="85" selection-end-column="21" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/assets/stylesheets/users.scss">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/app/controllers/questions_controller.rb">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="1.5404531">
|
||||
<caret line="56" column="13" selection-start-line="56" selection-start-column="13" selection-end-line="56" selection-end-column="13" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
</project>
|
2
Gemfile
2
Gemfile
|
@ -10,7 +10,7 @@ gem 'mini_magick', '3.8.0'
|
|||
gem 'fog', '~> 1.36.0'
|
||||
gem 'will_paginate', '3.0.7'
|
||||
gem 'bootstrap-will_paginate', '0.0.10'
|
||||
# gem 'bootstrap-sass', '~> 3.3.6'
|
||||
gem 'bootstrap-sass', '~> 3.3.7'
|
||||
# Use mysql as the database for Active Record
|
||||
gem 'mysql2', '>= 0.3.13', '< 0.5'
|
||||
# Use SCSS for stylesheets
|
||||
|
|
|
@ -38,7 +38,12 @@ GEM
|
|||
tzinfo (~> 1.1)
|
||||
ansi (1.5.0)
|
||||
arel (6.0.4)
|
||||
autoprefixer-rails (7.1.6)
|
||||
execjs
|
||||
bcrypt (3.1.7)
|
||||
bootstrap-sass (3.3.7)
|
||||
autoprefixer-rails (>= 5.2.1)
|
||||
sass (>= 3.3.4)
|
||||
bootstrap-will_paginate (0.0.10)
|
||||
will_paginate
|
||||
builder (3.2.3)
|
||||
|
@ -327,6 +332,7 @@ PLATFORMS
|
|||
|
||||
DEPENDENCIES
|
||||
bcrypt (= 3.1.7)
|
||||
bootstrap-sass (~> 3.3.7)
|
||||
bootstrap-will_paginate (= 0.0.10)
|
||||
byebug
|
||||
carrierwave (= 0.10.0)
|
||||
|
|
|
@ -13,4 +13,6 @@
|
|||
// = require jquery3
|
||||
// = require jquery_ujs
|
||||
// = require turbolinks
|
||||
//= require bootstrap-sprockets
|
||||
//= require_tree .
|
||||
|
||||
|
|
|
@ -1,104 +0,0 @@
|
|||
! function() {
|
||||
//封装方法,压缩之后减少文件大小
|
||||
function get_attribute(node, attr, default_value) {
|
||||
return node.getAttribute(attr) || default_value;
|
||||
}
|
||||
//封装方法,压缩之后减少文件大小
|
||||
function get_by_tagname(name) {
|
||||
return document.getElementsByTagName(name);
|
||||
}
|
||||
//获取配置参数
|
||||
function get_config_option() {
|
||||
var scripts = get_by_tagname("script"),
|
||||
script_len = scripts.length,
|
||||
script = scripts[script_len - 1]; //当前加载的script
|
||||
return {
|
||||
l: script_len, //长度,用于生成id用
|
||||
z: get_attribute(script, "zIndex", -1), //z-index
|
||||
o: get_attribute(script, "opacity", 0.5), //opacity
|
||||
c: get_attribute(script, "color", "0,0,0"), //color
|
||||
n: get_attribute(script, "count", 99) //count
|
||||
};
|
||||
}
|
||||
//设置canvas的高宽
|
||||
function set_canvas_size() {
|
||||
canvas_width = the_canvas.width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
|
||||
canvas_height = the_canvas.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
|
||||
}
|
||||
//绘制过程
|
||||
function draw_canvas() {
|
||||
context.clearRect(0, 0, canvas_width, canvas_height);
|
||||
//随机的线条和当前位置联合数组
|
||||
var e, i, d, x_dist, y_dist, dist; //临时节点
|
||||
//遍历处理每一个点
|
||||
random_lines.forEach(function(r, idx) {
|
||||
r.x += r.xa,
|
||||
r.y += r.ya, //移动
|
||||
r.xa *= r.x > canvas_width || r.x < 0 ? -1 : 1,
|
||||
r.ya *= r.y > canvas_height || r.y < 0 ? -1 : 1, //碰到边界,反向反弹
|
||||
context.fillRect(r.x - 0.5, r.y - 0.5, 1, 1); //绘制一个宽高为1的点
|
||||
//从下一个点开始
|
||||
for (i = idx + 1; i < all_array.length; i++) {
|
||||
e = all_array[i];
|
||||
//不是当前点
|
||||
if (null !== e.x && null !== e.y) {
|
||||
x_dist = r.x - e.x, //x轴距离 l
|
||||
y_dist = r.y - e.y, //y轴距离 n
|
||||
dist = x_dist * x_dist + y_dist * y_dist; //总距离, m
|
||||
dist < e.max && (e === current_point && dist >= e.max / 2 && (r.x -= 0.03 * x_dist, r.y -= 0.03 * y_dist), //靠近的时候加速
|
||||
d = (e.max - dist) / e.max,
|
||||
context.beginPath(),
|
||||
context.lineWidth = d / 2,
|
||||
context.strokeStyle = "rgba(" + config.c + "," + (d + 0.2) + ")",
|
||||
context.moveTo(r.x, r.y),
|
||||
context.lineTo(e.x, e.y),
|
||||
context.stroke());
|
||||
}
|
||||
}
|
||||
}), frame_func(draw_canvas);
|
||||
}
|
||||
//创建画布,并添加到body中
|
||||
var the_canvas = document.createElement("canvas"), //画布
|
||||
config = get_config_option(), //配置
|
||||
canvas_id = "c_n" + config.l, //canvas id
|
||||
context = the_canvas.getContext("2d"), canvas_width, canvas_height,
|
||||
frame_func = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(func) {
|
||||
window.setTimeout(func, 1000 / 45);
|
||||
}, random = Math.random,
|
||||
current_point = {
|
||||
x: null, //当前鼠标x
|
||||
y: null, //当前鼠标y
|
||||
max: 20000
|
||||
},
|
||||
all_array;
|
||||
the_canvas.id = canvas_id;
|
||||
the_canvas.style.cssText = "position:fixed;top:0;left:0;z-index:" + config.z + ";opacity:" + config.o;
|
||||
get_by_tagname("body")[0].appendChild(the_canvas);
|
||||
//初始化画布大小
|
||||
set_canvas_size(), window.onresize = set_canvas_size;
|
||||
//当时鼠标位置存储,离开的时候,释放当前位置信息
|
||||
window.onmousemove = function(e) {
|
||||
e = e || window.event, current_point.x = e.clientX, current_point.y = e.clientY;
|
||||
}, window.onmouseout = function() {
|
||||
current_point.x = null, current_point.y = null;
|
||||
};
|
||||
//随机生成config.n条线位置信息
|
||||
for (var random_lines = [], i = 0; config.n > i; i++) {
|
||||
var x = random() * canvas_width, //随机位置
|
||||
y = random() * canvas_height,
|
||||
xa = 2 * random() - 1, //随机运动方向
|
||||
ya = 2 * random() - 1;
|
||||
random_lines.push({
|
||||
x: x,
|
||||
y: y,
|
||||
xa: xa,
|
||||
ya: ya,
|
||||
max: 6000 //沾附距离
|
||||
});
|
||||
}
|
||||
all_array = random_lines.concat([current_point]);
|
||||
//0.1秒后绘制
|
||||
setTimeout(function() {
|
||||
draw_canvas();
|
||||
}, 100);
|
||||
}();
|
|
@ -1,820 +0,0 @@
|
|||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var bootsnav = {
|
||||
initialize: function() {
|
||||
this.event();
|
||||
this.hoverDropdown();
|
||||
this.navbarSticky();
|
||||
this.navbarScrollspy();
|
||||
},
|
||||
event : function(){
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Variable
|
||||
// ------------------------------------------------------------------------------ //
|
||||
var getNav = $("nav.navbar.bootsnav");
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Navbar Center
|
||||
// ------------------------------------------------------------------------------ //
|
||||
if( getNav.hasClass("brand-center")){
|
||||
var postsArr = [],
|
||||
index = $("nav.brand-center"),
|
||||
$postsList = index.find('ul.navbar-nav');
|
||||
|
||||
//Create array of all posts in lists
|
||||
index.find('ul.navbar-nav > li').each(function(){
|
||||
postsArr.push($(this).html());
|
||||
});
|
||||
|
||||
//Split the array at this point. The original array is altered.
|
||||
var firstList = postsArr.splice(0, Math.round(postsArr.length / 2)),
|
||||
secondList = postsArr,
|
||||
ListHTML = '';
|
||||
|
||||
var createHTML = function(list){
|
||||
ListHTML = '';
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
ListHTML += '<li>' + list[i] + '</li>'
|
||||
}
|
||||
};
|
||||
|
||||
//Generate HTML for first list
|
||||
createHTML(firstList);
|
||||
$postsList.html(ListHTML);
|
||||
index.find("ul.nav").first().addClass("navbar-left");
|
||||
|
||||
//Generate HTML for second list
|
||||
createHTML(secondList);
|
||||
//Create new list after original one
|
||||
$postsList.after('<ul class="nav navbar-nav"></ul>').next().html(ListHTML);
|
||||
index.find("ul.nav").last().addClass("navbar-right");
|
||||
|
||||
//Wrap navigation menu
|
||||
index.find("ul.nav.navbar-left").wrap("<div class='col-half left'></div>");
|
||||
index.find("ul.nav.navbar-right").wrap("<div class='col-half right'></div>");
|
||||
|
||||
//Selection Class
|
||||
index.find('ul.navbar-nav > li').each(function(){
|
||||
var dropDown = $("ul.dropdown-menu", this),
|
||||
megaMenu = $("ul.megamenu-content", this);
|
||||
dropDown.closest("li").addClass("dropdown");
|
||||
megaMenu.closest("li").addClass("megamenu-fw");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Navbar Sidebar
|
||||
// ------------------------------------------------------------------------------ //
|
||||
if( getNav.hasClass("navbar-sidebar")){
|
||||
// Add Class to body
|
||||
$("body").addClass("wrap-nav-sidebar");
|
||||
getNav.wrapInner("<div class='scroller'></div>");
|
||||
}else{
|
||||
$(".bootsnav").addClass("on");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Menu Center
|
||||
// ------------------------------------------------------------------------------ //
|
||||
if( getNav.find("ul.nav").hasClass("navbar-center")){
|
||||
getNav.addClass("menu-center");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Navbar Full
|
||||
// ------------------------------------------------------------------------------ //
|
||||
if( getNav.hasClass("navbar-full")){
|
||||
// Add Class to body
|
||||
$("nav.navbar.bootsnav").find("ul.nav").wrap("<div class='wrap-full-menu'></div>");
|
||||
$(".wrap-full-menu").wrap("<div class='nav-full'></div>");
|
||||
$("ul.nav.navbar-nav").prepend("<li class='close-full-menu'><a href='#'><i class='fa fa-times'></i></a></li>");
|
||||
}else if( getNav.hasClass("navbar-mobile")){
|
||||
getNav.removeClass("no-full");
|
||||
}else{
|
||||
getNav.addClass("no-full");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Navbar Mobile
|
||||
// ------------------------------------------------------------------------------ //
|
||||
if( getNav.hasClass("navbar-mobile")){
|
||||
// Add Class to body
|
||||
$('.navbar-collapse').on('shown.bs.collapse', function() {
|
||||
$("body").addClass("side-right");
|
||||
});
|
||||
$('.navbar-collapse').on('hide.bs.collapse', function() {
|
||||
$("body").removeClass("side-right");
|
||||
});
|
||||
|
||||
$(window).on("resize", function(){
|
||||
$("body").removeClass("side-right");
|
||||
});
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Navbar Fixed
|
||||
// ------------------------------------------------------------------------------ //
|
||||
if( getNav.hasClass("no-background")){
|
||||
$(window).on("scroll", function(){
|
||||
var scrollTop = $(window).scrollTop();
|
||||
if(scrollTop >34){
|
||||
$(".navbar-fixed").removeClass("no-background");
|
||||
}else {
|
||||
$(".navbar-fixed").addClass("no-background");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Navbar Fixed
|
||||
// ------------------------------------------------------------------------------ //
|
||||
if( getNav.hasClass("navbar-transparent")){
|
||||
$(window).on("scroll", function(){
|
||||
var scrollTop = $(window).scrollTop();
|
||||
if(scrollTop >34){
|
||||
$(".navbar-fixed").removeClass("navbar-transparent");
|
||||
}else {
|
||||
$(".navbar-fixed").addClass("navbar-transparent");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Button Cart
|
||||
// ------------------------------------------------------------------------------ //
|
||||
$(".btn-cart").on("click", function(e){
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Toggle Search
|
||||
// ------------------------------------------------------------------------------ //
|
||||
$("nav.navbar.bootsnav .attr-nav").each(function(){
|
||||
$("li.search > a", this).on("click", function(e){
|
||||
e.preventDefault();
|
||||
$(".top-search").slideToggle();
|
||||
});
|
||||
});
|
||||
$(".input-group-addon.close-search").on("click", function(){
|
||||
$(".top-search").slideUp();
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Toggle Side Menu
|
||||
// ------------------------------------------------------------------------------ //
|
||||
$("nav.navbar.bootsnav .attr-nav").each(function(){
|
||||
$("li.side-menu > a", this).on("click", function(e){
|
||||
e.preventDefault();
|
||||
$("nav.navbar.bootsnav > .side").toggleClass("on");
|
||||
$("body").toggleClass("on-side");
|
||||
});
|
||||
});
|
||||
$(".side .close-side").on("click", function(e){
|
||||
e.preventDefault();
|
||||
$("nav.navbar.bootsnav > .side").removeClass("on");
|
||||
$("body").removeClass("on-side");
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Navbat Tabs
|
||||
// ------------------------------------------------------------------------------ //
|
||||
$(".tab-nav li").each(function(){
|
||||
$("a", this).off("click");
|
||||
$("a", this).on("click", function(e){
|
||||
e.preventDefault();
|
||||
var cek = $(this).closest("li").hasClass("active");
|
||||
if( cek ){
|
||||
$("a", this).off("click");
|
||||
}else{
|
||||
var getID = $(this).attr("href");
|
||||
$(".tab-nav li").removeClass("active");
|
||||
$(this).closest("li").addClass("active");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(".dropdown-tabs .tab-pane").each(function(){
|
||||
var getBG = $(this).data("background");
|
||||
$(this).css("background-image","url('" + getBG +"')");
|
||||
$(this).addClass("animated");
|
||||
});
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Wrapper
|
||||
// ------------------------------------------------------------------------------ //
|
||||
$("body").wrapInner( "<div class='wrapper'></div>");
|
||||
},
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Change dropdown to hover on dekstop
|
||||
// ------------------------------------------------------------------------------ //
|
||||
hoverDropdown : function(){
|
||||
var getNav = $("nav.navbar.bootsnav"),
|
||||
getWindow = $(window).width(),
|
||||
getHeight = $(window).height(),
|
||||
getIn = getNav.find("ul.nav").data("in"),
|
||||
getOut = getNav.find("ul.nav").data("out");
|
||||
|
||||
if( getWindow < 981 ){
|
||||
|
||||
// Height of scroll navigation sidebar
|
||||
$(".scroller").css("height", "auto");
|
||||
|
||||
// Disable mouseenter event
|
||||
$("nav.navbar.bootsnav ul.nav").find("li.dropdown").off("mouseenter");
|
||||
$("nav.navbar.bootsnav ul.nav").find("li.dropdown").off("mouseleave");
|
||||
$("nav.navbar.bootsnav ul.nav").find(".title").off("mouseenter");
|
||||
$("nav.navbar.bootsnav ul.nav").off("mouseleave");
|
||||
$(".navbar-collapse").removeClass("animated");
|
||||
|
||||
// Enable click event
|
||||
$("nav.navbar.bootsnav ul.nav").each(function(){
|
||||
$(".dropdown-menu", this).addClass("animated");
|
||||
$(".dropdown-menu", this).removeClass(getOut);
|
||||
|
||||
// Dropdown Fade Toggle
|
||||
$("a.dropdown-toggle", this).off('click');
|
||||
$("a.dropdown-toggle", this).on('click', function (e) {
|
||||
e.stopPropagation();
|
||||
$(this).closest("li.dropdown").find(".dropdown-menu").first().stop().fadeToggle().toggleClass(getIn);
|
||||
$(this).closest("li.dropdown").first().toggleClass("on");
|
||||
return false;
|
||||
});
|
||||
|
||||
// Hidden dropdown action
|
||||
$('li.dropdown', this).each(function () {
|
||||
$(this).find(".dropdown-menu").stop().fadeOut();
|
||||
$(this).on('hidden.bs.dropdown', function () {
|
||||
$(this).find(".dropdown-menu").stop().fadeOut();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
// Megamenu style
|
||||
$(".megamenu-fw", this).each(function(){
|
||||
$(".col-menu", this).each(function(){
|
||||
$(".content", this).addClass("animated");
|
||||
$(".content", this).stop().fadeOut();
|
||||
$(".title", this).off("click");
|
||||
$(".title", this).on("click", function(){
|
||||
$(this).closest(".col-menu").find(".content").stop().fadeToggle().addClass(getIn);
|
||||
$(this).closest(".col-menu").toggleClass("on");
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".content", this).on("click", function(e){
|
||||
e.stopPropagation();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Hidden dropdown
|
||||
var cleanOpen = function(){
|
||||
$('li.dropdown', this).removeClass("on");
|
||||
$(".dropdown-menu", this).stop().fadeOut();
|
||||
$(".dropdown-menu", this).removeClass(getIn);
|
||||
$(".col-menu", this).removeClass("on");
|
||||
$(".col-menu .content", this).stop().fadeOut();
|
||||
$(".col-menu .content", this).removeClass(getIn);
|
||||
};
|
||||
|
||||
// Hidden om mouse leave
|
||||
$("nav.navbar.bootsnav").on("mouseleave", function(){
|
||||
cleanOpen();
|
||||
});
|
||||
|
||||
// Enable click atribute navigation
|
||||
$("nav.navbar.bootsnav .attr-nav").each(function(){
|
||||
$(".dropdown-menu", this).removeClass("animated");
|
||||
$("li.dropdown", this).off("mouseenter");
|
||||
$("li.dropdown", this).off("mouseleave");
|
||||
$("a.dropdown-toggle", this).off('click');
|
||||
$("a.dropdown-toggle", this).on('click', function (e) {
|
||||
e.stopPropagation();
|
||||
$(this).closest("li.dropdown").find(".dropdown-menu").first().stop().fadeToggle();
|
||||
$(".navbar-toggle").each(function(){
|
||||
$(".fa", this).removeClass("fa-times");
|
||||
$(".fa", this).addClass("fa-bars");
|
||||
$(".navbar-collapse").removeClass("in");
|
||||
$(".navbar-collapse").removeClass("on");
|
||||
});
|
||||
});
|
||||
|
||||
$(this).on("mouseleave", function(){
|
||||
$(".dropdown-menu", this).stop().fadeOut();
|
||||
$("li.dropdown", this).removeClass("on");
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
// Toggle Bars
|
||||
$(".navbar-toggle").each(function(){
|
||||
$(this).off("click");
|
||||
$(this).on("click", function(){
|
||||
$(".fa", this).toggleClass("fa-bars");
|
||||
$(".fa", this).toggleClass("fa-times");
|
||||
cleanOpen();
|
||||
});
|
||||
});
|
||||
|
||||
}else if( getWindow > 981 ){
|
||||
// Height of scroll navigation sidebar
|
||||
$(".scroller").css("height", getHeight + "px");
|
||||
|
||||
// Navbar Sidebar
|
||||
if( getNav.hasClass("navbar-sidebar")){
|
||||
// Hover effect Sidebar Menu
|
||||
$("nav.navbar.bootsnav ul.nav").each(function(){
|
||||
$("a.dropdown-toggle", this).off('click');
|
||||
$("a.dropdown-toggle", this).on('click', function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
$(".dropdown-menu", this).addClass("animated");
|
||||
$("li.dropdown", this).on("mouseenter", function(){
|
||||
$(".dropdown-menu", this).eq(0).removeClass(getOut);
|
||||
$(".dropdown-menu", this).eq(0).stop().fadeIn().addClass(getIn);
|
||||
$(this).addClass("on");
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".col-menu").each(function(){
|
||||
$(".content", this).addClass("animated");
|
||||
$(".title", this).on("mouseenter", function(){
|
||||
$(this).closest(".col-menu").find(".content").stop().fadeIn().addClass(getIn);
|
||||
$(this).closest(".col-menu").addClass("on");
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
$(this).on("mouseleave", function(){
|
||||
$(".dropdown-menu", this).stop().removeClass(getIn);
|
||||
$(".dropdown-menu", this).stop().addClass(getOut).fadeOut();
|
||||
$(".col-menu", this).find(".content").stop().fadeOut().removeClass(getIn);
|
||||
$(".col-menu", this).removeClass("on");
|
||||
$("li.dropdown", this).removeClass("on");
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}else{
|
||||
// Hover effect Default Menu
|
||||
$("nav.navbar.bootsnav ul.nav").each(function(){
|
||||
$("a.dropdown-toggle", this).off('click');
|
||||
$("a.dropdown-toggle", this).on('click', function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
$(".megamenu-fw", this).each(function(){
|
||||
$(".title", this).off("click");
|
||||
$("a.dropdown-toggle", this).off("click");
|
||||
$(".content").removeClass("animated");
|
||||
});
|
||||
|
||||
$(".dropdown-menu", this).addClass("animated");
|
||||
$("li.dropdown", this).on("mouseenter", function(){
|
||||
$(".dropdown-menu", this).eq(0).removeClass(getOut);
|
||||
$(".dropdown-menu", this).eq(0).stop().fadeIn().addClass(getIn);
|
||||
$(this).addClass("on");
|
||||
return false;
|
||||
});
|
||||
|
||||
$("li.dropdown", this).on("mouseleave", function(){
|
||||
$(".dropdown-menu", this).eq(0).removeClass(getIn);
|
||||
$(".dropdown-menu", this).eq(0).stop().fadeOut().addClass(getOut);
|
||||
$(this).removeClass("on");
|
||||
});
|
||||
|
||||
$(this).on("mouseleave", function(){
|
||||
$(".dropdown-menu", this).removeClass(getIn);
|
||||
$(".dropdown-menu", this).eq(0).stop().fadeOut().addClass(getOut);
|
||||
$("li.dropdown", this).removeClass("on");
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Hover effect Atribute Navigation
|
||||
// ------------------------------------------------------------------------------ //
|
||||
$("nav.navbar.bootsnav .attr-nav").each(function(){
|
||||
$("a.dropdown-toggle", this).off('click');
|
||||
$("a.dropdown-toggle", this).on('click', function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
$(".dropdown-menu", this).addClass("animated");
|
||||
$("li.dropdown", this).on("mouseenter", function(){
|
||||
$(".dropdown-menu", this).eq(0).removeClass(getOut);
|
||||
$(".dropdown-menu", this).eq(0).stop().fadeIn().addClass(getIn);
|
||||
$(this).addClass("on");
|
||||
return false;
|
||||
});
|
||||
|
||||
$("li.dropdown", this).on("mouseleave", function(){
|
||||
$(".dropdown-menu", this).eq(0).removeClass(getIn);
|
||||
$(".dropdown-menu", this).eq(0).stop().fadeOut().addClass(getOut);
|
||||
$(this).removeClass("on");
|
||||
});
|
||||
|
||||
$(this).on("mouseleave", function(){
|
||||
$(".dropdown-menu", this).removeClass(getIn);
|
||||
$(".dropdown-menu", this).eq(0).stop().fadeOut().addClass(getOut);
|
||||
$("li.dropdown", this).removeClass("on");
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Menu Fullscreen
|
||||
// ------------------------------------------------------------------------------ //
|
||||
if( getNav.hasClass("navbar-full")){
|
||||
var windowHeight = $(window).height(),
|
||||
windowWidth = $(window).width();
|
||||
|
||||
$(".nav-full").css("height", windowHeight + "px");
|
||||
$(".wrap-full-menu").css("height", windowHeight + "px");
|
||||
$(".wrap-full-menu").css("width", windowWidth + "px");
|
||||
|
||||
$(".navbar-collapse").addClass("animated");
|
||||
$(".navbar-toggle").each(function(){
|
||||
var getId = $(this).data("target");
|
||||
$(this).off("click");
|
||||
$(this).on("click", function(e){
|
||||
e.preventDefault();
|
||||
$(getId).removeClass(getOut);
|
||||
$(getId).addClass("in");
|
||||
$(getId).addClass(getIn);
|
||||
return false;
|
||||
});
|
||||
|
||||
$("li.close-full-menu").on("click", function(e){
|
||||
e.preventDefault();
|
||||
$(getId).addClass(getOut);
|
||||
setTimeout(function(){
|
||||
$(getId).removeClass("in");
|
||||
$(getId).removeClass(getIn);
|
||||
}, 500);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Navbar Sticky
|
||||
// ------------------------------------------------------------------------------ //
|
||||
navbarSticky : function(){
|
||||
var getNav = $("nav.navbar.bootsnav"),
|
||||
navSticky = getNav.hasClass("navbar-sticky");
|
||||
|
||||
if( navSticky ){
|
||||
// Wraped navigation
|
||||
getNav.wrap("<div class='wrap-sticky'></div>");
|
||||
|
||||
// Set Height Navigation
|
||||
var getHeight = getNav.height();
|
||||
$(".wrap-sticky").height(getHeight);
|
||||
|
||||
// Windown on scroll
|
||||
var getOffset = $(".wrap-sticky").offset().top;
|
||||
$(window).on("scroll", function(){
|
||||
var scrollTop = $(window).scrollTop();
|
||||
if(scrollTop > getOffset){
|
||||
getNav.addClass("sticked");
|
||||
}else {
|
||||
getNav.removeClass("sticked");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// ------------------------------------------------------------------------------ //
|
||||
// Navbar Scrollspy
|
||||
// ------------------------------------------------------------------------------ //
|
||||
navbarScrollspy : function(){
|
||||
var navScrollSpy = $(".navbar-scrollspy"),
|
||||
$body = $('body'),
|
||||
getNav = $('nav.navbar.bootsnav'),
|
||||
offset = getNav.outerHeight();
|
||||
|
||||
if( navScrollSpy.length ){
|
||||
$body.scrollspy({target: '.navbar', offset: offset });
|
||||
|
||||
// Animation Scrollspy
|
||||
$('.scroll').on('click', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
// Active link
|
||||
$('.scroll').removeClass("active");
|
||||
$(this).addClass("active");
|
||||
|
||||
// Remove navbar collapse
|
||||
$(".navbar-collapse").removeClass("in");
|
||||
|
||||
// Toggle Bars
|
||||
$(".navbar-toggle").each(function(){
|
||||
$(".fa", this).removeClass("fa-times");
|
||||
$(".fa", this).addClass("fa-bars");
|
||||
});
|
||||
|
||||
// Scroll
|
||||
var scrollTop = $(window).scrollTop(),
|
||||
$anchor = $(this).find('a'),
|
||||
$section = $($anchor.attr('href')).offset().top,
|
||||
$window = $(window).width(),
|
||||
$minusDesktop = getNav.data("minus-value-desktop"),
|
||||
$minusMobile = getNav.data("minus-value-mobile"),
|
||||
$speed = getNav.data("speed");
|
||||
|
||||
if( $window > 992 ){
|
||||
var $position = $section - $minusDesktop;
|
||||
}else{
|
||||
var $position = $section - $minusMobile;
|
||||
}
|
||||
|
||||
$('html, body').stop().animate({
|
||||
scrollTop: $position
|
||||
}, $speed);
|
||||
});
|
||||
|
||||
// Activate Navigation
|
||||
var fixSpy = function() {
|
||||
var data = $body.data('bs.scrollspy');
|
||||
if (data) {
|
||||
offset = getNav.outerHeight();
|
||||
data.options.offset = offset;
|
||||
$body.data('bs.scrollspy', data);
|
||||
$body.scrollspy('refresh');
|
||||
}
|
||||
};
|
||||
|
||||
// Activate Navigation on resize
|
||||
var resizeTimer;
|
||||
$(window).on('resize', function() {
|
||||
clearTimeout(resizeTimer);
|
||||
var resizeTimer = setTimeout(fixSpy, 200);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Initialize
|
||||
$(document).ready(function(){
|
||||
bootsnav.initialize();
|
||||
});
|
||||
|
||||
// Reset on resize
|
||||
$(window).on("resize", function(){
|
||||
bootsnav.hoverDropdown();
|
||||
bootsnav.navbarSticky();
|
||||
|
||||
// Toggle Bars
|
||||
$(".navbar-toggle").each(function(){
|
||||
$(".fa", this).removeClass("fa-times");
|
||||
$(".fa", this).addClass("fa-bars");
|
||||
$(this).removeClass("fixed");
|
||||
});
|
||||
$(".navbar-collapse").removeClass("in");
|
||||
$(".navbar-collapse").removeClass("on");
|
||||
$(".navbar-collapse").removeClass("bounceIn");
|
||||
});
|
||||
|
||||
|
||||
}(jQuery));
|
||||
|
||||
// tooltip提示代码
|
||||
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
});
|
||||
|
||||
|
||||
// 问答详情页的问题代码的复制和粘贴样式
|
||||
|
||||
window.onload = function(){
|
||||
var ms = document.getElementById("ques-code-content");
|
||||
var add = document.getElementById("codetool-content");
|
||||
ms.onmouseover = function(){
|
||||
add.style.display = "block";
|
||||
};
|
||||
ms.onmouseout = function(){
|
||||
add.style.display = "none";
|
||||
};
|
||||
add.onmouseover =function () {
|
||||
add.style.display = "block";
|
||||
}
|
||||
};
|
||||
|
||||
// 个人页面鼠标滑动切换个人图片
|
||||
|
||||
$(document).ready(function(){
|
||||
$('.user_profile_avatar .UserAvatar').hover(function() {
|
||||
$(".profile_avatar-uploader").css('display', 'block');
|
||||
}, function() {
|
||||
$(".profile_avatar-uploader").css('display', 'none');
|
||||
});
|
||||
$(".profile_avatar-uploader").hover(function() {
|
||||
$(this).css('display', 'block');
|
||||
}, function() {
|
||||
$(this).css('display', 'none');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// 个人页面点击查看详细资料,展示隐藏的部分
|
||||
$(function() {
|
||||
$('.user_profile-contentFooter .btn-noBorder').on('click', function(){
|
||||
$(".user_profile-contentBody").removeClass('userHideCss').addClass('userShowCss');
|
||||
$(".user_profile-infoItem > i").hide();
|
||||
$(".user_profile-infoItem .userLabel").removeClass('hide').addClass('show');
|
||||
$('.btn-noBorder').css('display', 'none');
|
||||
$('.btn-noBorderH').css('display', 'inline-block');
|
||||
});
|
||||
$('.user_profile-contentFooter .btn-noBorderH').on('click',function () {
|
||||
$(".user_profile-contentBody").removeClass('userShowCss').addClass('userHideCss');
|
||||
$(".user_profile-infoItem > i").show();
|
||||
$(".user_profile-infoItem .userLabel").removeClass('show').addClass('hide');
|
||||
$('.btn-noBorder').css('display', 'inline-block');
|
||||
$('.btn-noBorderH').css('display', 'none');
|
||||
})
|
||||
});
|
||||
|
||||
// 个人页面点击查看内容左侧隐藏的部分,展示隐藏的部分
|
||||
|
||||
$(function() {
|
||||
$('.userProfileMore .btn-noBorder').on('click', function(){
|
||||
$(".userProfile_Item").removeClass('LeftHideCss').addClass('LeftShowCss');
|
||||
$('.userProfileMore .btn-noBorder').css('display', 'none');
|
||||
$('.userProfileMore .btn-noBorderH').css('display', 'inline-block');
|
||||
});
|
||||
$('.userProfileMore .btn-noBorderH').on('click',function () {
|
||||
$(".userProfile_Item").removeClass('LeftShowCss').addClass('LeftHideCss');
|
||||
$('.userProfileMore .btn-noBorder').css('display', 'inline-block');
|
||||
$('.userProfileMore .btn-noBorderH').css('display', 'none');
|
||||
})
|
||||
});
|
||||
|
||||
// 问答详情页的超长文字隐藏和打开代码
|
||||
|
||||
$(function() {
|
||||
var e = {
|
||||
readMore: function() {
|
||||
function e() {
|
||||
i ? ($(".ques-body").height("").css({
|
||||
overflow: "hidden"
|
||||
}), $(".ques-body-hidden").show().addClass("readall_box_nobg"), $(".ques-body-hidden").hide().addClass("readall_box_nobg"), i = !1) : ($(".ques-body").height(2 * t).css({
|
||||
overflow: "hidden"
|
||||
}), $(".ques-body-hidden").show().removeClass("readall_box_nobg"), i = !0)
|
||||
}
|
||||
var t = $(window).height(),
|
||||
n = $(".ques-body").height();
|
||||
// if (username === currentUserName) return $(".ques-body-hidden").hide().addClass("readall_box_nobg"),
|
||||
// !1;
|
||||
if (n > 2 * t) {
|
||||
$(".ques-body").height(2 * t - 285).css({
|
||||
overflow: "hidden"
|
||||
});
|
||||
var i = !0;
|
||||
$(".read_more_btn").on("click", e)
|
||||
} else i = !0,
|
||||
$(".ques-body").removeClass("article_Hide"),
|
||||
$(".ques-body-hidden").hide().addClass("readall_box_nobg")
|
||||
},
|
||||
|
||||
};
|
||||
e.readMore()
|
||||
});
|
||||
|
||||
|
||||
// 问答详情页的点击立即回答跳转到bootstrap-markdown框
|
||||
|
||||
|
||||
$(function() {
|
||||
|
||||
if ($('.answer-ques .answer_ques_before').hasClass('show')){
|
||||
$('.answer-button').on('click',function () {
|
||||
$('.answer_ques_before').removeClass('show').addClass('hidden');
|
||||
$('.answer-content').removeClass('hidden').addClass('show');
|
||||
$('.ques_time_surplus').removeClass('hidden').addClass('show').addEventListener("onclick",Get_time());
|
||||
|
||||
});
|
||||
}else{
|
||||
$('.answer-content').addClass('hidden');
|
||||
$('.answer_ques_before').addClass('show');
|
||||
$('.ques_time_surplus').addClass('hidden');
|
||||
}
|
||||
|
||||
// 问答详情页的点击立即回答跳转到bootstrap-markdown框后出现的倒计时
|
||||
|
||||
function Get_time(){
|
||||
var t = $(".answer_ques_before").find(".questions_time").text()*60;
|
||||
var half_t = 0.5*t;
|
||||
setInterval(function(){
|
||||
t--;
|
||||
if(t>=0){
|
||||
m = parseInt(t/60);
|
||||
s = t - m*60;
|
||||
document.getElementById("t_m").innerHTML = m + "分";
|
||||
document.getElementById("t_s").innerHTML = s + "秒";
|
||||
if(t === half_t){
|
||||
alert("时间已经过了一半了,如果不能确认回答,请及时放弃问题,这样不会受惩罚!")
|
||||
}
|
||||
if(t === 5*60){
|
||||
alert("还有5分钟,可以申请延时哦!");
|
||||
}
|
||||
if(t === 0){
|
||||
alert("时间到了!")
|
||||
}
|
||||
}},1000);
|
||||
}
|
||||
});
|
||||
|
||||
/*问题详情页,输入标题、分类、标签及时间和费用时下面的提示项*/
|
||||
$(function () {
|
||||
$('#myAsk').on('click', function () {
|
||||
if ($('.ask__title p').hasClass('hidden')) {
|
||||
$('.ask__title p').removeClass('hidden').addClass('show');
|
||||
} else {
|
||||
$('.ask__title p').addClass('hidden').removeClass('show');
|
||||
}
|
||||
});
|
||||
|
||||
$('#myTags').on('click', function () {
|
||||
if ($('.ask__tags p').hasClass('hidden')) {
|
||||
$('.ask__tags p').removeClass('hidden').addClass('show');
|
||||
|
||||
} else {
|
||||
$('.ask__tags p').addClass('hidden').removeClass('show');
|
||||
}
|
||||
});
|
||||
|
||||
$('#askPay').on('click', function () {
|
||||
if ($('.ask__pay p').hasClass('hidden')) {
|
||||
$('.ask__pay p').removeClass('hidden').addClass('show');
|
||||
} else {
|
||||
$('.ask__pay p').addClass('hidden').removeClass('show');
|
||||
}
|
||||
});
|
||||
|
||||
$('#askTime').on('click', function () {
|
||||
if ($('.ask__time p').hasClass('hidden')) {
|
||||
$('.ask__time p').removeClass('hidden').addClass('show');
|
||||
} else {
|
||||
$('.ask__time p').addClass('hidden').removeClass('show');
|
||||
}
|
||||
});
|
||||
/*本来想做提示项的倒计时,然后可自动消失的,但是,倒计时不能插入p后面*/
|
||||
|
||||
|
||||
// var t = 5;
|
||||
// function showTime() {
|
||||
// if(t===0){
|
||||
// $('.ask__title p').removeClass('show').addClass('hidden');
|
||||
// }else{
|
||||
// // var s = document.getElementsByTagName("p").value()
|
||||
// // document.getElementsByTagName("p").innerHTML= t;
|
||||
// t=t-1;
|
||||
// setTimeout(function () {
|
||||
// showTime(t);
|
||||
// },1000);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
});
|
||||
|
||||
/*个人页面--编辑个人资料--鼠标滑过出现编辑字样*/
|
||||
$('.editBody .Field').each(function(i) {
|
||||
$(this).hover(
|
||||
function () {
|
||||
$('.editBody .Field:eq('+i+')').find('.btn-edit').removeClass('hidden').on('click',function () {
|
||||
$('.Field:eq('+i+')').find('.Field-edit').removeClass('hidden');
|
||||
$('.Field:eq('+i+')').find('.Field-content ').addClass('hidden');
|
||||
$('.Field:eq('+i+')').find('button[type=button]').on('click',function(){
|
||||
$('.Field:eq('+i+')').find('.Field-edit').addClass('hidden');
|
||||
$('.Field:eq('+i+')').find('.Field-content ').removeClass('hidden');
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
function () {
|
||||
$('.editBody .Field:eq('+i+')').find('.btn-edit').addClass('hidden');
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,168 +0,0 @@
|
|||
+function ($) { "use strict";
|
||||
|
||||
var isIE = window.navigator.appName == 'Microsoft Internet Explorer';
|
||||
|
||||
var Fileinput = function (element, options) {
|
||||
this.$element = $(element);
|
||||
|
||||
this.$input = this.$element.find(':file');
|
||||
if (this.$input.length === 0) return;
|
||||
|
||||
this.name = this.$input.attr('name') || options.name;
|
||||
|
||||
this.$hidden = this.$element.find('input[type=hidden][name="' + this.name + '"]');
|
||||
if (this.$hidden.length === 0) {
|
||||
this.$hidden = $('<input type="hidden">').insertBefore(this.$input)
|
||||
}
|
||||
|
||||
this.$preview = this.$element.find('.fileinput-preview');
|
||||
var height = this.$preview.css('height');
|
||||
if (this.$preview.css('display') !== 'inline' && height !== '0px' && height !== 'none') {
|
||||
this.$preview.css('line-height', height)
|
||||
}
|
||||
|
||||
this.original = {
|
||||
exists: this.$element.hasClass('fileinput-exists'),
|
||||
preview: this.$preview.html(),
|
||||
hiddenVal: this.$hidden.val()
|
||||
};
|
||||
|
||||
this.listen()
|
||||
};
|
||||
|
||||
Fileinput.prototype.listen = function() {
|
||||
this.$input.on('change.bs.fileinput', $.proxy(this.change, this));
|
||||
$(this.$input[0].form).on('reset.bs.fileinput', $.proxy(this.reset, this));
|
||||
|
||||
this.$element.find('[data-trigger="fileinput"]').on('click.bs.fileinput', $.proxy(this.trigger, this));
|
||||
this.$element.find('[data-dismiss="fileinput"]').on('click.bs.fileinput', $.proxy(this.clear, this))
|
||||
};
|
||||
|
||||
Fileinput.prototype.change = function(e) {
|
||||
var files = e.target.files === undefined ? (e.target && e.target.value ? [{ name: e.target.value.replace(/^.+\\/, '')}] : []) : e.target.files;
|
||||
|
||||
e.stopPropagation();
|
||||
|
||||
if (files.length === 0) {
|
||||
this.clear();
|
||||
return
|
||||
}
|
||||
|
||||
this.$hidden.val('');
|
||||
this.$hidden.attr('name', '');
|
||||
this.$input.attr('name', this.name);
|
||||
|
||||
var file = files[0];
|
||||
|
||||
if (this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match(/^image\/(gif|png|jpeg)$/) : file.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader !== "undefined") {
|
||||
var reader = new FileReader();
|
||||
var preview = this.$preview;
|
||||
var element = this.$element;
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
|
||||
|
||||
reader.onload = function(re) {
|
||||
var $img = $('<img>');
|
||||
$img[0].src = re.target.result;
|
||||
files[0].result = re.target.result;
|
||||
|
||||
element.find('.fileinput-filename').text(file.name);
|
||||
|
||||
// if parent has max-height, using `(max-)height: 100%` on child doesn't take padding and border into account
|
||||
if (preview.css('max-height') != 'none') $img.css('max-height', parseInt(preview.css('max-height'), 10) - parseInt(preview.css('padding-top'), 10) - parseInt(preview.css('padding-bottom'), 10) - parseInt(preview.css('border-top'), 10) - parseInt(preview.css('border-bottom'), 10));
|
||||
|
||||
preview.html($img);
|
||||
element.addClass('fileinput-exists').removeClass('fileinput-new');
|
||||
|
||||
element.trigger('change.bs.fileinput', files)
|
||||
};
|
||||
|
||||
reader.readAsDataURL(file)
|
||||
} else {
|
||||
this.$element.find('.fileinput-filename').text(file.name);
|
||||
this.$preview.text(file.name);
|
||||
|
||||
this.$element.addClass('fileinput-exists').removeClass('fileinput-new');
|
||||
|
||||
this.$element.trigger('change.bs.fileinput')
|
||||
}
|
||||
};
|
||||
|
||||
Fileinput.prototype.clear = function(e) {
|
||||
if (e) e.preventDefault();
|
||||
|
||||
this.$hidden.val('');
|
||||
this.$hidden.attr('name', this.name);
|
||||
this.$input.attr('name', '');
|
||||
|
||||
//ie8+ doesn't support changing the value of input with type=file so clone instead
|
||||
if (isIE) {
|
||||
var inputClone = this.$input.clone(true);
|
||||
this.$input.after(inputClone);
|
||||
this.$input.remove();
|
||||
this.$input = inputClone;
|
||||
} else {
|
||||
this.$input.val('')
|
||||
}
|
||||
|
||||
this.$preview.html('');
|
||||
this.$element.find('.fileinput-filename').text('');
|
||||
this.$element.addClass('fileinput-new').removeClass('fileinput-exists');
|
||||
|
||||
if (e !== undefined) {
|
||||
this.$input.trigger('change');
|
||||
this.$element.trigger('clear.bs.fileinput')
|
||||
}
|
||||
};
|
||||
|
||||
Fileinput.prototype.reset = function() {
|
||||
this.clear();
|
||||
|
||||
this.$hidden.val(this.original.hiddenVal);
|
||||
this.$preview.html(this.original.preview);
|
||||
this.$element.find('.fileinput-filename').text('');
|
||||
|
||||
if (this.original.exists) this.$element.addClass('fileinput-exists').removeClass('fileinput-new');
|
||||
else this.$element.addClass('fileinput-new').removeClass('fileinput-exists');
|
||||
|
||||
this.$element.trigger('reset.bs.fileinput')
|
||||
};
|
||||
|
||||
Fileinput.prototype.trigger = function(e) {
|
||||
this.$input.trigger('click');
|
||||
e.preventDefault()
|
||||
};
|
||||
|
||||
var old = $.fn.fileinput;
|
||||
|
||||
$.fn.fileinput = function (options) {
|
||||
return this.each(function () {
|
||||
var $this = $(this),
|
||||
data = $this.data('bs.fileinput');
|
||||
if (!data) $this.data('bs.fileinput', (data = new Fileinput(this, options)));
|
||||
if (typeof options == 'string') data[options]()
|
||||
})
|
||||
};
|
||||
|
||||
$.fn.fileinput.Constructor = Fileinput;
|
||||
|
||||
$.fn.fileinput.noConflict = function () {
|
||||
$.fn.fileinput = old;
|
||||
return this
|
||||
};
|
||||
|
||||
$(document).on('click.fileinput.data-api', '[data-provides="fileinput"]', function (e) {
|
||||
var $this = $(this);
|
||||
if ($this.data('bs.fileinput')) return;
|
||||
$this.fileinput($this.data());
|
||||
|
||||
var $target = $(e.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]');
|
||||
if ($target.length > 0) {
|
||||
e.preventDefault();
|
||||
$target.trigger('click.bs.fileinput');
|
||||
}
|
||||
});
|
||||
|
||||
}(window.jQuery);
|
File diff suppressed because it is too large
Load Diff
|
@ -1,31 +0,0 @@
|
|||
/**
|
||||
* Chinese translation for bootstrap-markdown
|
||||
* benhaile <denghaier@163.com>
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.markdown.messages.zh = {
|
||||
'Bold': "加粗 ",
|
||||
'Italic': "斜体 ",
|
||||
'Heading': "标题 ",
|
||||
'URL/Link': "链接 ",
|
||||
'Image': "图片 ",
|
||||
'Video': "小视频 ",
|
||||
'List': "列表 ",
|
||||
'Unordered List': "无序列表 ",
|
||||
'Ordered List': "有序列表 ",
|
||||
'Code': "代码 ",
|
||||
'Quote': "引用 ",
|
||||
'Preview': "预览 ",
|
||||
'strong text': "粗体 ",
|
||||
'emphasized text': "强调 ",
|
||||
'heading text': "标题 ",
|
||||
'enter link description here': "请输入链接描述 ",
|
||||
'Insert Hyperlink': "URL地址 ",
|
||||
'enter image description here': "输入图片说明 ",
|
||||
'Insert Image Hyperlink': "图片URL地址 ",
|
||||
'enter image title here': "在这里输入图片标题 ",
|
||||
'list text here': "这里是列表文本 ",
|
||||
'code text here': "这里输入代码 ",
|
||||
'quote here': "这里输入引用文本 "
|
||||
};
|
||||
}(jQuery));
|
File diff suppressed because one or more lines are too long
|
@ -1,94 +0,0 @@
|
|||
!function() {
|
||||
function o(w, v, i) {
|
||||
return w.getAttribute(v) || i
|
||||
}
|
||||
function j(i) {
|
||||
return document.getElementsByTagName(i)
|
||||
}
|
||||
function l() {
|
||||
var i = j("script"),
|
||||
w = i.length,
|
||||
v = i[w - 1];
|
||||
return {
|
||||
l: w,
|
||||
z: o(v, "zIndex", -1),
|
||||
o: o(v, "opacity", 0.5),
|
||||
c: o(v, "color", "3,168,168"),
|
||||
n: o(v, "count", 99)
|
||||
}
|
||||
}
|
||||
function k() {
|
||||
r = u.width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
|
||||
n = u.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
|
||||
}
|
||||
function b() {
|
||||
e.clearRect(0, 0, r, n);
|
||||
var w = [f].concat(t);
|
||||
var x, v, A, B, z, y;
|
||||
t.forEach(function(i) {
|
||||
i.x += i.xa,
|
||||
i.y += i.ya,
|
||||
i.xa *= i.x > r || i.x < 0 ? -1 : 1,
|
||||
i.ya *= i.y > n || i.y < 0 ? -1 : 1,
|
||||
e.fillRect(i.x - 0.5, i.y - 0.5, 1, 1);
|
||||
for (v = 0; v < w.length; v++) {
|
||||
x = w[v];
|
||||
if (i !== x && null !== x.x && null !== x.y) {
|
||||
B = i.x - x.x,
|
||||
z = i.y - x.y,
|
||||
y = B * B + z * z;
|
||||
y < x.max && (x === f && y >= x.max / 2 && (i.x -= 0.03 * B, i.y -= 0.03 * z), A = (x.max - y) / x.max, e.beginPath(), e.lineWidth = A / 2, e.strokeStyle = "rgba(" + s.c + "," + (A + 0.2) + ")", e.moveTo(i.x, i.y), e.lineTo(x.x, x.y), e.stroke())
|
||||
}
|
||||
}
|
||||
w.splice(w.indexOf(i), 1)
|
||||
}),
|
||||
m(b)
|
||||
}
|
||||
var u = document.createElement("canvas"),
|
||||
s = l(),
|
||||
c = "c_n" + s.l,
|
||||
e = u.getContext("2d"),
|
||||
r,
|
||||
n,
|
||||
m = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame ||
|
||||
function(i) {
|
||||
window.setTimeout(i, 1000 / 45)
|
||||
},
|
||||
a = Math.random,
|
||||
f = {
|
||||
x: null,
|
||||
y: null,
|
||||
max: 20000
|
||||
};
|
||||
u.id = c;
|
||||
u.style.cssText = "position:fixed;top:0;left:0;z-index:" + s.z + ";opacity:" + s.o;
|
||||
j("body")[0].appendChild(u);
|
||||
k(),
|
||||
window.onresize = k;
|
||||
window.onmousemove = function(i) {
|
||||
i = i || window.event,
|
||||
f.x = i.clientX,
|
||||
f.y = i.clientY
|
||||
},
|
||||
window.onmouseout = function() {
|
||||
f.x = null,
|
||||
f.y = null
|
||||
};
|
||||
for (var t = [], p = 0; s.n > p; p++) {
|
||||
var h = a() * r,
|
||||
g = a() * n,
|
||||
q = 2 * a() - 1,
|
||||
d = 2 * a() - 1;
|
||||
t.push({
|
||||
x: h,
|
||||
y: g,
|
||||
xa: q,
|
||||
ya: d,
|
||||
max: 6000
|
||||
})
|
||||
}
|
||||
setTimeout(function() {
|
||||
b()
|
||||
},
|
||||
100)
|
||||
} ();
|
|
@ -1,45 +0,0 @@
|
|||
|
||||
function showLoginForm(){
|
||||
$('#loginModal .registerBox').fadeOut('fast',function(){
|
||||
$('.loginBox').fadeIn('fast');
|
||||
$('.register-footer').fadeOut('fast',function(){
|
||||
$('.login-footer').fadeIn('fast');
|
||||
});
|
||||
|
||||
$('.modal-title').html('注册 or 登录');
|
||||
});
|
||||
$('.error').removeClass('alert alert-danger').html('');
|
||||
}
|
||||
|
||||
function openLoginModal(){
|
||||
showLoginForm();
|
||||
setTimeout(function(){
|
||||
$('#loginModal').modal('show');
|
||||
}, 230);
|
||||
|
||||
}
|
||||
|
||||
function loginAjax(){
|
||||
/* Remove this comments when moving to server
|
||||
$.post( "/login", function( data ) {
|
||||
if(data == 1){
|
||||
window.location.replace("/home");
|
||||
} else {
|
||||
shakeModal();
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
/* Simulate error message from the server */
|
||||
shakeModal();
|
||||
}
|
||||
|
||||
function shakeModal(){
|
||||
$('#loginModal .modal-dialog').addClass('shake');
|
||||
$('.error').addClass('alert alert-danger').html("错误:无效的用户名或密码");
|
||||
$('input[type="password"]').val('');
|
||||
setTimeout( function(){
|
||||
$('#loginModal .modal-dialog').removeClass('shake');
|
||||
}, 1000 );
|
||||
}
|
||||
|
|
@ -1,775 +0,0 @@
|
|||
/*
|
||||
* markdown-editor.js
|
||||
*
|
||||
* Markdown Editor plugin for jQuery.
|
||||
*/
|
||||
|
||||
function markdown2html(text) {
|
||||
return markdown.toHTML(text);
|
||||
}
|
||||
|
||||
//function里的this只和哪个对象调用了这个function有关
|
||||
|
||||
! function ($) {
|
||||
var Markdown = function (element, options, commands) {
|
||||
this.options = options;
|
||||
this.$textarea = $(element); //将此textarea 封装为JQuery对象赋给MarkDown的$textarea元素
|
||||
if (!this.$textarea.is('textarea')) { //is 可以检测元素
|
||||
alert('only textarea can change to markdown!');
|
||||
return;
|
||||
}
|
||||
this.buildMarkdown(commands);
|
||||
};
|
||||
|
||||
var TextAreaDelegate = function (the_toolbar, the_textarea, the_preview, options) {
|
||||
this.$toolbar = the_toolbar;
|
||||
this.$textarea = the_textarea;
|
||||
this.$container = the_textarea.parent();
|
||||
this.$dom = the_textarea.get(0); //将输入内容的JQuery对象转为js可操作的DOM对象,$(this)[0]=$(this).get(0)=$(this).toArray()[0];
|
||||
this.$preview = the_preview;
|
||||
this.$options = options;
|
||||
};
|
||||
|
||||
TextAreaDelegate.prototype = { //prototype 属性使你有能力向对象添加属性和方法。
|
||||
|
||||
constructor: TextAreaDelegate, //constructor 属性返回TextAreaDelegate数组对象原型创建的函数。
|
||||
|
||||
enableAllButtons: function (enabled) { //全部按钮可启用
|
||||
var btns = this.$toolbar.find('button[data-cmd]'); //寻找toolbar即功能按钮的属性
|
||||
if (enabled) { //按钮被启用,移除disabled属性
|
||||
btns.removeAttr('disabled');
|
||||
} else { //按钮没被启用,添加disabled='disabled'属性
|
||||
btns.attr('disabled', 'disabled');
|
||||
}
|
||||
},
|
||||
//单个按钮可启用
|
||||
enableButton: function (key, enabled) {
|
||||
var btn = this.$toolbar.find('button[data-cmd="' + key + '"]');
|
||||
if (enabled) {
|
||||
btn.removeAttr('disabled');
|
||||
} else {
|
||||
btn.attr('disabled', 'disabled');
|
||||
}
|
||||
},
|
||||
|
||||
getText: function () {
|
||||
return this.$textarea.val(); //val() 方法返回或复制被选元素的 value 属性,属于jquery的方法。textarea文本域的value值,即用户输入信息
|
||||
},
|
||||
|
||||
getOption: function (key) {
|
||||
return this.$options[key]; //获取选项,option 集合可返回包含 <select> 元素中所有 <option> 的一个数组。
|
||||
},
|
||||
|
||||
paste: function (s) {
|
||||
this.$dom.setRangeText(s); //setRangeText(replacement[, start, end, [mode]]) (设置内容范围)
|
||||
},
|
||||
|
||||
//获取按钮点击后的内容提取
|
||||
getSelection: function () {
|
||||
return this.$dom.value.substring(this.$dom.selectionStart, this.$dom.selectionEnd);
|
||||
//substring() 方法用于提取字符串中介于两个指定下标之间的字符。
|
||||
//substring() 方法返回的子串包括 开始selectionStart 处的字符,但不包括 结束selectionEnd 处的字符。
|
||||
},
|
||||
|
||||
//获取选中内容的开始位置
|
||||
getCaretPosition: function () {
|
||||
//输入性元素selection起点的位置,可读写
|
||||
return this.$dom.selectionStart;
|
||||
},
|
||||
|
||||
//获取光标所在行
|
||||
selectCurrentLine: function () {
|
||||
var pos = this.getCaretPosition();
|
||||
var ss = this.$dom.value.split('\n'); //分割 返回一个数组
|
||||
var start = 0;
|
||||
var end = 0;
|
||||
for (var i = 0; i < ss.length; i++) {
|
||||
var s = ss[i];
|
||||
//光标位置小于下一行第一个
|
||||
if ((start + s.length + 1) > pos) {
|
||||
end = start + s.length;
|
||||
break;
|
||||
}
|
||||
start += (s.length + 1); //如果光标不在本行,将开始点置为下一行起始
|
||||
}
|
||||
//start为本行第一个,end为本行最后一个(\n)
|
||||
this.setSelection(start, end); //选中光标所在的一行
|
||||
return this.getSelection();
|
||||
},
|
||||
|
||||
|
||||
|
||||
unselect: function () {
|
||||
var p = this.getCaretPosition();
|
||||
this.$dom.setSelectionRange(p, p);
|
||||
},
|
||||
|
||||
//setSelectionRange()方法是作用在input元素上的,其次,这个方法可以为当前元素内的文本设置备选中范围(selection)。简单来说,就是可以通过设置起始于终止位置,来选中一段文本中的一部分。值得一提的是,在新版中,该方法还接受一个可选参数,这个参数指定的选择的方向。
|
||||
|
||||
setSelection: function (start, end) {
|
||||
|
||||
this.$dom.setSelectionRange(start, end);
|
||||
},
|
||||
//设置选中区域 开始==结束
|
||||
setCaretPosition: function (pos) {
|
||||
this.$dom.setSelectionRange(pos, pos);
|
||||
}
|
||||
};
|
||||
|
||||
Markdown.prototype = {
|
||||
constructor: Markdown,
|
||||
|
||||
applyCss: function () {
|
||||
var css = {
|
||||
'resize': 'none',
|
||||
'font-family': 'Monaco, Menlo, Consolas, "Courier New", monospace',
|
||||
};
|
||||
$that = this;
|
||||
$.map(css, function (v, k) { //遍历/each
|
||||
$that.$textarea.css(k, v);
|
||||
});
|
||||
},
|
||||
|
||||
executeCommand: function (cmd) {
|
||||
var fn = this.$commands[cmd];
|
||||
fn && fn(this.$delegate);
|
||||
},
|
||||
|
||||
buildMarkdown: function (commands) {
|
||||
$that = this;
|
||||
var L = ['<div class="markdown-toolbar"><div class="btn-group btn-group-sm">'];
|
||||
$.each(this.options.buttons, function (index, ele) {
|
||||
if (ele === '|') { //遍历button 以 | 分组
|
||||
L.push('</div><div class="btn-group btn-group-sm">');
|
||||
}
|
||||
else if(ele === '||'){
|
||||
L.push('</div><div class="btn-group btn-group-sm pull-right">');
|
||||
}
|
||||
else {
|
||||
$icon = $that.options.icons[ele] || 'glyphicon glyphicon-star'; //button的icon 默认为☆
|
||||
$tooltips = $that.options.tooltips[ele] || ''; //button的title 默认为☆
|
||||
//字体 下拉 单独处理
|
||||
if (ele === 'heading') {
|
||||
L.push('<button class="btn dropdown-toggle" data-toggle="dropdown" data-cmd="heading" title="' + $tooltips + '"><span class="' + $icon + '"></span> <span class="caret"></span></button>');
|
||||
L.push('<ul class="dropdown-menu" role="menu">');
|
||||
//data-cmd 指定绑定的函数名
|
||||
L.push('<li><a href="javascript:void(0)" data-type="md" data-cmd="heading1"># 标题一</a></li>');
|
||||
L.push('<li><a href="javascript:void(0)" data-type="md" data-cmd="heading2">## 标题二</a></li>');
|
||||
L.push('<li><a href="javascript:void(0)" data-type="md" data-cmd="heading3">### 标题三</a></li>');
|
||||
L.push('</ul>');
|
||||
} else {
|
||||
//普通按钮
|
||||
L.push('<button type="button" data-type="md" data-cmd="' + ele + '" title="' + $tooltips + '" class="btn' + ($icon.indexOf('glyphicon-white') >= 0 ? ' btn-info' : '') + '"><span class="' + $icon + '"></span></button>');
|
||||
}
|
||||
}
|
||||
});
|
||||
var tw = this.$textarea.outerWidth() - 2; //返回元素的宽度(包括内边距和边框)
|
||||
var th = this.$textarea.outerHeight() - 2; //返回元素的高度(包括内边距和边框)减去边框宽度
|
||||
L.push('</div></div><div class="markdown-preview" style="display:none;padding:0;margin:0;width:' + tw + 'px;height:' + th + 'px;overflow:scroll;background-color:white;border:1px solid #ccc;border-radius:4px"></div>');
|
||||
this.$commands = commands; //各种按钮对应的处理函数
|
||||
//before() 方法在被选元素前插入指定的内容
|
||||
this.$textarea.before(L.join('')); //join 将数组转化为字符串,各个元素以''
|
||||
this.$toolbar = this.$textarea.parent().find('div.markdown-toolbar');
|
||||
this.$preview = this.$textarea.parent().find('div.markdown-preview'); //隐藏 高度、宽度和输入框一致
|
||||
//构建编辑器 包含'工具栏'、'文本输入域'、'预览框'
|
||||
this.$delegate = new TextAreaDelegate(this.$toolbar, this.$textarea, this.$preview, this.options);
|
||||
this.$toolbar.find('*[data-type=md]').each(function () {
|
||||
var $btn = $(this);
|
||||
//data-cmd 指定绑定的函数名
|
||||
var cmd = $btn.attr('data-cmd');
|
||||
//为每个按钮绑定click事件
|
||||
$btn.click(function () {
|
||||
$that.executeCommand(cmd);
|
||||
});
|
||||
try {
|
||||
//$btn.tooltip();
|
||||
} catch (e) { /* ignore if tooltip.js not exist */ }
|
||||
});
|
||||
this.applyCss();
|
||||
},
|
||||
|
||||
showBackdrop: function () {
|
||||
if (!this.$backdrop) {
|
||||
this.$backdrop = $('<div class="modal-backdrop" />').appendTo(document.body);
|
||||
}
|
||||
},
|
||||
|
||||
hideBackdrop: function () {
|
||||
this.$backdrop && this.$backdrop.remove();
|
||||
this.$backdrop = null;
|
||||
},
|
||||
};
|
||||
|
||||
function setHeading(s, heading) {
|
||||
var re = new RegExp('^#{1,3}\\s');
|
||||
var h = re.exec(s);
|
||||
if (h !== null) {
|
||||
s = s.substring(h[0].length);
|
||||
}
|
||||
return heading + s;
|
||||
}
|
||||
|
||||
var commands = {
|
||||
|
||||
heading1: function (delegate) {
|
||||
var line = delegate.selectCurrentLine();
|
||||
delegate.paste(setHeading(line, '# 标题一'));
|
||||
},
|
||||
|
||||
heading2: function (delegate) {
|
||||
var line = delegate.selectCurrentLine();
|
||||
delegate.paste(setHeading(line, '## 标题二'));
|
||||
},
|
||||
|
||||
heading3: function (delegate) {
|
||||
var line = delegate.selectCurrentLine();
|
||||
delegate.paste(setHeading(line, '### 标题三'));
|
||||
},
|
||||
|
||||
//粗体
|
||||
bold: function (delegate) {
|
||||
var s = delegate.getSelection(); //表示文本框输入内容
|
||||
if (s === '') {
|
||||
s = '加粗文字';
|
||||
delegate.paste('**' + s + '**');
|
||||
|
||||
} else {
|
||||
delegate.paste('**' + s + '**');
|
||||
}
|
||||
|
||||
},
|
||||
//斜体
|
||||
italic: function (delegate) {
|
||||
var s = delegate.getSelection();
|
||||
if (s === '') {
|
||||
delegate.paste('*请输入内容*');
|
||||
// make cursor to: *|*
|
||||
delegate.setCaretPosition(delegate.getCaretPosition() + 1);
|
||||
} else {
|
||||
delegate.paste('*' + s + '*');
|
||||
}
|
||||
},
|
||||
//有序列表
|
||||
ul: function (delegate) {
|
||||
var chunk, cursor, selected = delegate.getSelection();
|
||||
// content = delegate.getContent();
|
||||
|
||||
// transform selection and set the cursor into chunked text
|
||||
if (selected.length === 0) {
|
||||
// Give extra word
|
||||
chunk = 'list text here';
|
||||
delegate.paste('1. ' + chunk);
|
||||
// Set the cursor
|
||||
delegate.setCaretPosition(delegate.getCaretPosition() + chunk.length);
|
||||
} else {
|
||||
if (selected.text.indexOf('\n') < 0) {
|
||||
chunk = selected.text;
|
||||
|
||||
delegate.paste('1. ' + chunk);
|
||||
|
||||
// Set the cursor
|
||||
cursor = selected.start + 3;
|
||||
} else {
|
||||
var i = 1;
|
||||
var list = [];
|
||||
|
||||
list = selected.text.split('\n');
|
||||
chunk = list[0];
|
||||
|
||||
$.each(list, function(k, v) {
|
||||
list[k] = i + '. ' + v;
|
||||
i++;
|
||||
});
|
||||
|
||||
delegate.paste('\n\n' + list.join('\n'));
|
||||
|
||||
// Set the cursor
|
||||
cursor = selected.start + 5;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the cursor
|
||||
delegate.setSelection(cursor, cursor + chunk.length);
|
||||
//
|
||||
//
|
||||
// var s = delegate.getSelection();
|
||||
// if (s === '') {
|
||||
// delegate.paste('1. ' + '请输入内容');
|
||||
// // make cursor to: *|*
|
||||
// delegate.setCaretPosition(delegate.getCaretPosition() + 3);
|
||||
// } else {
|
||||
// delegate.paste('*' + s + '*');
|
||||
// }
|
||||
},
|
||||
//超链接
|
||||
link: function (delegate) {
|
||||
var s = '<div class="modal fade" style="overflow-y:hidden;" data-backdrop="static" role="dialog" aria-hidden="true">' +
|
||||
' <div class="modal-dialog">' +
|
||||
' <div class="modal-content">' +
|
||||
' <div class="modal-header">' +
|
||||
' <button type="button" class="close" data-dismiss="modal">×</button>' +
|
||||
' <h3 class="modal-title">插入链接</h3>' +
|
||||
' </div>' +
|
||||
' <div class="modal-body">' +
|
||||
' <form class="form-horizontal" role="form">' +
|
||||
' <div class="form-group">' +
|
||||
' <label class="col-md-2 control-label">链接名称</label>' +
|
||||
' <div class="col-md-10 controls">' +
|
||||
' <input name="text" class="form-control input-md" type="text" placeholder="输入链接名称" value="" />' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' <div class="form-group">' +
|
||||
' <label class="col-md-2 control-label">链接地址</label>' +
|
||||
' <div class="col-md-10 controls">' +
|
||||
' <input name="link" class="form-control input-md" type="text" placeholder="http://udaskweb.com" value="" />' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' </form>' +
|
||||
' </div>' +
|
||||
' <div class="modal-footer">' +
|
||||
' <a href="###" class="btn btn-md btn-primary">提交</a>' +
|
||||
' <a href="###" class="btn btn-md btn-default" data-dismiss="modal">关闭</a>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
'</div>';
|
||||
$('.questions-content').prepend(s);
|
||||
var $modal = $('.questions-content').children(':first');
|
||||
var sel = delegate.getSelection();
|
||||
//有选中值,将此值赋为link的name
|
||||
if (sel !== '') {
|
||||
$modal.find('input[name=text]').val(sel);
|
||||
}
|
||||
$modal.modal('show');
|
||||
$modal.find('.btn-primary').click(function () {
|
||||
|
||||
var text = $.trim($modal.find('input[name=text]').val());
|
||||
var link = $.trim($modal.find('input[name=link]').val());
|
||||
if (link === '') link = 'http://';
|
||||
//没有加http://时,为其加上
|
||||
if (link.indexOf('http://') === -1) link = 'http://' + link;
|
||||
if (text === '') text = link;
|
||||
delegate.paste('[' + text + '](' + link + ')');
|
||||
$modal.modal('hide');
|
||||
});
|
||||
$modal.on('hidden.bs.modal', function () {
|
||||
$modal.remove();
|
||||
});
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// if (link === '') link = 'http://';
|
||||
// //没有加http://时,为其加上
|
||||
// if (link.indexOf('http://') === -1) link = 'http://' + link;
|
||||
// if (text === '') text = link;
|
||||
// delegate.paste('[' + text + '](' + link + ')');
|
||||
// $modal.modal('hide');
|
||||
// });
|
||||
// $modal.on('hidden.bs.modal', function () {
|
||||
// $modal.remove();
|
||||
// });
|
||||
},
|
||||
//邮件
|
||||
email: function (delegate) {
|
||||
var s = '<div class="modal fade" style="overflow-y:hidden;" data-backdrop="static" role="dialog" aria-hidden="true">' +
|
||||
' <div class="modal-dialog">' +
|
||||
' <div class="modal-content">' +
|
||||
' <div class="modal-header">' +
|
||||
' <button type="button" class="close" data-dismiss="modal">×</button>' +
|
||||
' <h3 class="modal-title">Email Address</h3>' +
|
||||
' </div>' +
|
||||
' <div class="modal-body">' +
|
||||
' <form class="form-horizontal" role="form">' +
|
||||
' <div class="form-group">' +
|
||||
' <label class="col-md-2 control-label">Name</label>' +
|
||||
' <div class="col-md-10 controls">' +
|
||||
' <input name="text" class="form-control input-md" type="text" value="" />' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' <div class="form-group">' +
|
||||
' <label class="col-md-2 control-label">Email</label>' +
|
||||
' <div class="col-md-10 controls">' +
|
||||
' <input name="email" class="form-control input-md" type="text" placeholder="email@example.com" value="" />' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' </form>' +
|
||||
' </div>' +
|
||||
' <div class="modal-footer">' +
|
||||
' <a href="#" class="btn btn-md btn-primary">OK</a>' +
|
||||
' <a href="#" class="btn btn-md btn-default" data-dismiss="modal">Close</a>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
'</div>';
|
||||
$('body').prepend(s);
|
||||
var $modal = $('body').children(':first');
|
||||
var sel = delegate.getSelection();
|
||||
if (sel != '') {
|
||||
$modal.find('input[name=text]').val(sel);
|
||||
}
|
||||
$modal.modal('show');
|
||||
$modal.find('.btn-primary').click(function () {
|
||||
var text = $.trim($modal.find('input[name=text]').val());
|
||||
var email = $.trim($modal.find('input[name=email]').val());
|
||||
if (email == '') email = 'email@example.com';
|
||||
if (email.indexOf('mailto:') === -1) email = 'mailto:' + email;
|
||||
if (text == '') text = email;
|
||||
delegate.paste('[' + text + '](' + email + ')');
|
||||
$modal.modal('hide');
|
||||
});
|
||||
$modal.on('hidden.bs.modal', function () {
|
||||
$modal.remove();
|
||||
});
|
||||
},
|
||||
//上传图片,待测试
|
||||
image: function (delegate) {
|
||||
var getObjectURL = function (file) {
|
||||
var url = '';
|
||||
if (window.createObjectURL != undefined) // basic
|
||||
url = window.createObjectURL(file);
|
||||
else if (window.URL != undefined) // mozilla(firefox)
|
||||
url = window.URL.createObjectURL(file);
|
||||
else if (window.webkitURL != undefined) // webkit or chrome
|
||||
url = window.webkitURL.createObjectURL(file);
|
||||
return url;
|
||||
};
|
||||
var s = '<div class="modal fade" style="overflow-y:hidden;" data-backdrop="static" role="dialog" aria-hidden="true">' +
|
||||
' <div class="modal-dialog">' +
|
||||
' <div class="modal-content">' +
|
||||
' <div class="modal-header">' +
|
||||
' <button type="button" class="close" data-dismiss="modal">×</button>' +
|
||||
' <h3 class="modal-title">Insert Image</h3>' +
|
||||
' </div>' +
|
||||
' <div class="modal-body">' +
|
||||
' <div style="width:530px;"> ' +
|
||||
' <div class="alert alert-danger hidden"></div>' +
|
||||
' <div class="row">' +
|
||||
' <div class="col-md-5" style="width:230px"> ' +
|
||||
' <label class="control-label">Preview</label>' +
|
||||
' <div class="preview" style="width:200px;height:150px;border:solid 1px #ccc;padding:4px;margin-top:3px;background-repeat:no-repeat;background-position:center center;background-size:cover;"></div>' +
|
||||
' </div>' +
|
||||
' <div class="col-md-7" style="width:300px"> ' +
|
||||
' <form class="form-horizontal" role="form">' +
|
||||
' <div class="form-group" style="margin-bottom: 5px;">' +
|
||||
' <label class="control-label">Text</label>' +
|
||||
' <input name="text" type="text" class="form-control input-md" value="" />' +
|
||||
' </div>' +
|
||||
' <div class="form-group" style="margin-bottom: 5px;">' +
|
||||
' <label class="control-label">File</label>' +
|
||||
' <input name="file" type="file" />' +
|
||||
' </div>' +
|
||||
' <div class="form-group" style="margin-bottom: 5px;">' +
|
||||
' <label class="control-label">Progress</label>' +
|
||||
' <div class="progress progress-striped active" >' +
|
||||
' <div class="bar" style="width:0%;"></div>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' </form>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' <div class="modal-footer" style="margin-top: 0;">' +
|
||||
' <button class="btn btn-md btn-primary">OK</button>' +
|
||||
' <button class="btn btn-md btn-cancel" data-dismiss="modal">Close</button>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
'</div>';
|
||||
$('body').prepend(s);
|
||||
var $modal = $('body').children(':first');
|
||||
var $form = $modal.find('form');
|
||||
var $text = $modal.find('input[name="text"]');
|
||||
var $file = $modal.find('input[name="file"]');
|
||||
var $prog = $modal.find('div.bar');
|
||||
var $preview = $modal.find('div.preview');
|
||||
var $alert = $modal.find('div.alert');
|
||||
var $status = {
|
||||
'uploading': false
|
||||
};
|
||||
$modal.modal('show');
|
||||
//校验文件类型
|
||||
$file.change(function () {
|
||||
// clear error:
|
||||
$alert.text('').removeClass('alert-danger show').addClass('hidden');
|
||||
//$alert.text('');
|
||||
|
||||
var f = $file.val();
|
||||
if (!f) {
|
||||
$preview.css('background-image', '');
|
||||
return;
|
||||
}
|
||||
var lf = $file.get(0).files[0];
|
||||
var ft = lf.type;
|
||||
console.log('ft:' + ft);
|
||||
if (ft == 'image/png' || ft == 'image/jpeg' || ft == 'image/gif') {
|
||||
$preview.css('background-image', 'url(' + getObjectURL(lf) + ')');
|
||||
if ($text.val() == '') {
|
||||
// extract filename without ext:
|
||||
var pos = Math.max(f.lastIndexOf('\\'), f.lastIndexOf('/'));
|
||||
if (pos > 0) {
|
||||
f = f.substring(pos + 1);
|
||||
}
|
||||
var pos = f.lastIndexOf('.');
|
||||
if (pos > 0) {
|
||||
f = f.substring(0, pos);
|
||||
}
|
||||
$text.val(f);
|
||||
}
|
||||
} else {
|
||||
$preview.css('background-image', '');
|
||||
//$alert.text('Not a valid web image.');
|
||||
$alert.text('Not a valid web image.').removeClass('hidden').addClass('alert-danger show');
|
||||
console.log('Not a valid web image.');
|
||||
}
|
||||
});
|
||||
|
||||
var cancel = function () {
|
||||
if ($status.uploading) {
|
||||
if (!confirm('File is uploading, are you sure you want to cancel it?')) {
|
||||
return;
|
||||
}
|
||||
if ($status.uploading) {
|
||||
$status.xhr.abort();
|
||||
}
|
||||
}
|
||||
$modal.modal('hide');
|
||||
};
|
||||
$modal.find('button.close').click(cancel);
|
||||
$modal.find('button.btn-cancel').click(cancel);
|
||||
$modal.find('.btn-primary').click(function () {
|
||||
// clear error:
|
||||
$alert.removeClass('alert-danger show').addClass('hidden').text('');
|
||||
// upload file:
|
||||
var f = $file.val();
|
||||
if (!f) {
|
||||
$alert.text('Please select file.').removeClass('hidden').addClass('alert-danger show');
|
||||
return;
|
||||
}
|
||||
var $url = delegate.getOption('upload_image_url');
|
||||
if (!$url) {
|
||||
$alert.text('upload_image_url not defined.').removeClass('hidden').addClass('alert-danger show');
|
||||
return;
|
||||
}
|
||||
try {
|
||||
var text = $text.val();
|
||||
var lf = $file.get(0).files[0];
|
||||
// send XMLHttpRequest2:
|
||||
var fd = null;
|
||||
var form = $form.get(0);
|
||||
try {
|
||||
fd = form.getFormData();
|
||||
} catch (e) {
|
||||
fd = new FormData(form);
|
||||
}
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.upload.addEventListener('progress', function (evt) {
|
||||
if (evt.lengthComputable) {
|
||||
var percent = evt.loaded * 100.0 / evt.total;
|
||||
$prog.css('width', percent.toFixed(1) + '%');
|
||||
}
|
||||
}, false);
|
||||
xhr.addEventListener('load', function (evt) {
|
||||
var r = $.parseJSON(evt.target.responseText);
|
||||
if (r.error) {
|
||||
$alert.removeClass('hidden').addClass('alert-danger show').text(r.message || r.error);
|
||||
$status.uploading = false;
|
||||
} else {
|
||||
// upload ok!
|
||||
delegate.unselect();
|
||||
var s = '\n![' + text.replace('[', '').replace(']', '') + '](' + r.url + ')\n';
|
||||
delegate.paste(s);
|
||||
delegate.setSelection(delegate.getCaretPosition() + 1, delegate.getCaretPosition() + s.length - 1);
|
||||
$modal.modal('hide');
|
||||
}
|
||||
}, false);
|
||||
xhr.addEventListener('error', function (evt) {
|
||||
$alert.removeClass('hidden').addClass('alert-danger show').text('Error: upload failed.');
|
||||
$status.uploading = false;
|
||||
}, false);
|
||||
xhr.addEventListener('abort', function (evt) {
|
||||
$status.uploading = false;
|
||||
}, false);
|
||||
xhr.open('post', $url);
|
||||
xhr.send(fd);
|
||||
$status.uploading = true;
|
||||
$status.xhr = xhr;
|
||||
$file.attr('disabled', 'disabled');
|
||||
} catch (e) {
|
||||
$alert.removeClass('hidden').addClass('alert-danger show').text('Could not upload.');
|
||||
}
|
||||
$(this).attr('disabled', 'disabled');
|
||||
});
|
||||
$modal.on('hidden.bs.modal', function () {
|
||||
$modal.remove();
|
||||
});
|
||||
},
|
||||
//预览
|
||||
preview: function (delegate) {
|
||||
if (!delegate.is_preview) {
|
||||
delegate.is_preview = true;
|
||||
delegate.enableAllButtons(false);
|
||||
delegate.enableButton('preview', true);
|
||||
delegate.$textarea.hide();
|
||||
delegate.$preview.html('<div style="padding:3px;">' + markdown2html(delegate.$textarea.val()) + '</div>').show();
|
||||
} else {
|
||||
delegate.is_preview = false;
|
||||
delegate.enableAllButtons(true);
|
||||
delegate.$preview.html('').hide();
|
||||
delegate.$textarea.show();
|
||||
}
|
||||
},
|
||||
//全屏编辑
|
||||
fullscreen: function (delegate) {
|
||||
if (!delegate.is_full_screen) {
|
||||
delegate.is_full_screen = true;
|
||||
delegate.enableButton('preview', false);
|
||||
var s = '<div style="overflow:auto;overflow-y:none;position:fixed;display:none;z-index:1000;top:0;right:0;bottom:0;left:0;background-color:#ffffff;">' +
|
||||
' <div style="z-index:1010;width:auto;padding:0;margin-right:0;margin-left:0;">' +
|
||||
' <div style="padding: 0;">' +
|
||||
' <div class="left" style="margin:0;padding:0 2px 2px 2px;float:left;"></div>' +
|
||||
' <div class="right" style="float:left;padding:0;margin:0;border-left:solid 1px #ccc;overflow:scroll;"></div>' +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
'</div>';
|
||||
$('body').prepend(s);
|
||||
var $modal = $('body').children(':first');
|
||||
console.log($modal.html());
|
||||
var $left = $modal.find('div.left');
|
||||
var $right = $modal.find('div.right');
|
||||
// $modal.modal('show');
|
||||
$modal.show();
|
||||
delegate.$fullscreen = $modal;
|
||||
//提到前面,防止自适应导致宽度变化
|
||||
// store old width and height for textarea: //记录旧时textarea大小
|
||||
//delegate.$textarea_old_width = delegate.$textarea.css('width');
|
||||
//delegate.$textarea_old_height = delegate.$textarea.css('height');
|
||||
delegate.$textarea_old_width = delegate.$textarea.innerWidth();
|
||||
delegate.$textarea_old_height = delegate.$textarea.innerHeight();
|
||||
delegate.$toolbar.appendTo($left);
|
||||
delegate.$textarea.appendTo($left);
|
||||
// bind resize:
|
||||
delegate.$fn_resize = function () {
|
||||
var w = $(window).width();
|
||||
var h = $(window).height();
|
||||
if (w < 960) {
|
||||
w = 960;
|
||||
}
|
||||
if (h < 300) {
|
||||
h = 300;
|
||||
}
|
||||
var rw = parseInt(w / 2);
|
||||
var $dom = delegate.$fullscreen;
|
||||
$dom.css('width', w + 'px');
|
||||
$dom.css('height', h + 'px');
|
||||
$dom.find('div.right').css('width', (rw - 1) + 'px').css('height', h + 'px');
|
||||
$dom.find('div.left').css('width', (w - rw - 4) + 'px').css('height', h + 'px');
|
||||
delegate.$textarea.css('width', (w - rw - 18) + 'px').css('height', (h - 64) + 'px');
|
||||
};
|
||||
$(window).bind('resize', delegate.$fn_resize).trigger('resize');
|
||||
$right.html(markdown2html(delegate.getText()));
|
||||
// bind text change:
|
||||
delegate.$n_wait_for_update = 0;
|
||||
delegate.$b_need_update = false;
|
||||
delegate.$fn_update_count = function () {
|
||||
if (delegate.$b_need_update && delegate.$n_wait_for_update > 10) {
|
||||
delegate.$b_need_update = false;
|
||||
delegate.$n_wait_for_update = 0;
|
||||
$right.html(markdown2html(delegate.getText()));
|
||||
} else {
|
||||
delegate.$n_wait_for_update++;
|
||||
}
|
||||
};
|
||||
setInterval(delegate.$fn_update_count, 100);
|
||||
delegate.$fn_keypress = function () {
|
||||
console.log('Keypress...');
|
||||
delegate.$b_need_update = true; // should update in N seconds
|
||||
delegate.$n_wait_for_update = 0; // reset count from 0
|
||||
};
|
||||
delegate.$textarea.bind('keypress', delegate.$fn_keypress);
|
||||
} else {
|
||||
// unbind:
|
||||
delegate.$textarea.unbind('keypress', delegate.$fn_keypress);
|
||||
$(window).unbind('resize', delegate.$fn_resize);
|
||||
delegate.$fn_keypress = null;
|
||||
delegate.$fn_resize = null;
|
||||
delegate.$fn_update_count = null;
|
||||
|
||||
delegate.is_full_screen = false;
|
||||
delegate.enableButton('preview', true);
|
||||
delegate.$toolbar.appendTo(delegate.$container);
|
||||
delegate.$preview.appendTo(delegate.$container);
|
||||
delegate.$textarea.appendTo(delegate.$container);
|
||||
// delegate.$fullscreen.modal('hide');
|
||||
delegate.$fullscreen.hide();
|
||||
delegate.$fullscreen.remove();
|
||||
// restore width & height:
|
||||
delegate.$textarea.css('width', delegate.$textarea_old_width).css('height', delegate.$textarea_old_height);
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
$.fn.markdown = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this);
|
||||
var data = $this.data('markdown'); //获取属性'data-markdown'的值 http://www.w3school.com.cn/jquery/data_jquery_data.asp
|
||||
var options = $.extend({}, $.fn.markdown.defaults, typeof option === 'object' && option);
|
||||
if (!data) {
|
||||
data = new Markdown(this, options, commands); //commands 定义各个按钮的处理函数
|
||||
$this.data('markdown', data);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.markdown.defaults = {
|
||||
buttons: [
|
||||
'heading','bold', 'italic',
|
||||
'|',
|
||||
'ul', 'quote','link', 'email','image', 'video',
|
||||
'|',
|
||||
'screenshot','remote-link','voice',
|
||||
'||',
|
||||
'preview','fullscreen',
|
||||
],
|
||||
tooltips: {
|
||||
'heading': '设置标题',
|
||||
'bold': '粗体',
|
||||
'italic': '斜体',
|
||||
'ul': '有序列表',
|
||||
'quote': '引用',
|
||||
'link': '链接',
|
||||
'email': '代码',
|
||||
'image': '图片',
|
||||
'video': '小视频',
|
||||
'screenshot': '截图',
|
||||
'remote-link': '远程链接',
|
||||
'voice': '语音通话',
|
||||
'preview': '预览',
|
||||
'fullscreen': '全屏模式',
|
||||
},
|
||||
icons: {
|
||||
'heading': 'fa fa-fw fa-font',
|
||||
'bold': 'fa fa-fw fa-bold',
|
||||
'italic': 'fa fa-fw fa-italic',
|
||||
'ul': 'fa fa-fw fa-list-ol',
|
||||
'quote': 'fa fa-fw fa-quote-left',
|
||||
'link': 'fa fa-fw fa-link',
|
||||
'email': 'fa fa-fw fa-code',
|
||||
'image': 'fa fa-fw fa-picture-o',
|
||||
'video': 'fa fa-fw fa-video-camera',
|
||||
'screenshot': 'fa fa-fw fa-scissors',
|
||||
'remote-link': 'fa fa-fw fa-exchange',
|
||||
'voice': 'fa fa-fw fa-microphone',
|
||||
'preview': 'fa fa-fw fa-eye text-blue',
|
||||
'fullscreen': 'fa fa-fw fa-arrows-alt text-blue',
|
||||
'smallscreens': 'fa fa-fw fa-compress text-blue'
|
||||
},
|
||||
upload_image_url: '',
|
||||
upload_file_url: '',
|
||||
};
|
||||
|
||||
$.fn.markdown.Constructor = Markdown;
|
||||
|
||||
}(window.jQuery);
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1,13 +0,0 @@
|
|||
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
|
||||
require('../../js/transition.js')
|
||||
require('../../js/alert.js')
|
||||
require('../../js/button.js')
|
||||
require('../../js/carousel.js')
|
||||
require('../../js/collapse.js')
|
||||
require('../../js/dropdown.js')
|
||||
require('../../js/modal.js')
|
||||
require('../../js/tooltip.js')
|
||||
require('../../js/popover.js')
|
||||
require('../../js/scrollspy.js')
|
||||
require('../../js/tab.js')
|
||||
require('../../js/affix.js')
|
|
@ -1,511 +0,0 @@
|
|||
/**
|
||||
* Created by hs on 2017/11/13.
|
||||
*/
|
||||
|
||||
//注册项目
|
||||
|
||||
var settings = {
|
||||
e: 'idcode',
|
||||
f:'idcodes',
|
||||
codeType: {
|
||||
name: 'follow',
|
||||
len: 4
|
||||
}, //len是修改验证码长度的
|
||||
// codeTip: '.fa-refresh',
|
||||
inputID: 'idcodes-btn' ,//验证元素的ID
|
||||
inputIDs:'idcodes-btns'
|
||||
};
|
||||
|
||||
var _set = {
|
||||
storeLable: 'codeval',
|
||||
store: '#ehong-code-input',
|
||||
codeval: '#ehong-code'
|
||||
};
|
||||
$.idcode = {
|
||||
getCode: function(option) {
|
||||
_commSetting(option);
|
||||
return _storeData(_set.storeLable, null);
|
||||
},
|
||||
setCode: function(option) {
|
||||
_commSetting(option);
|
||||
_setCodeStyle("#" + settings.e, settings.codeType.name, settings.codeType.len);
|
||||
|
||||
},
|
||||
//控制判断验证码的输入
|
||||
validateCode: function(option) {
|
||||
_commSetting(option);
|
||||
var inputV;
|
||||
if (settings.inputID) {
|
||||
inputV = $('#'+settings.inputID).val();
|
||||
} else {
|
||||
inputV = $(_set.store).val();
|
||||
}
|
||||
//修改的不区分大小写
|
||||
if (inputV.toUpperCase() == $.idcode.getCode().toUpperCase()) {
|
||||
return true;
|
||||
} else {
|
||||
_setCodeStyle("#" + settings.e, settings.codeType.name, settings.codeType.len);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function _commSetting(option) {
|
||||
$.extend(settings, option);
|
||||
}
|
||||
|
||||
function _storeData(dataLabel, data) {
|
||||
var store = $(_set.codeval).get(0);
|
||||
if (data) {
|
||||
$.data(store, dataLabel, data);
|
||||
} else {
|
||||
return $.data(store, dataLabel);
|
||||
}
|
||||
}
|
||||
|
||||
function _setCodeStyle(eid, codeType, codeLength) {
|
||||
var codeObj = _createCode(settings.codeType.name, settings.codeType.len);
|
||||
var randNum = Math.floor(Math.random() * 6);
|
||||
var htmlCode = '';
|
||||
if (!settings.inputID) {
|
||||
htmlCode = '<span><input id="ehong-code-input" type="text" maxlength="4" /></span>';
|
||||
}
|
||||
htmlCode += '<div id="ehong-code" class="ehong-idcode-val ehong-idcode-val';
|
||||
htmlCode += String(randNum);
|
||||
htmlCode += '" href="#" onblur="return false" onfocus="return false" oncontextmenu="return false" onclick="$.idcode.setCode()">' + _setStyle(codeObj) + '</div>' + '<span id="ehong-code-tip-ck" class="ehong-code-val-tip" onclick="$.idcode.setCode()">' +'<i class="fa fa-refresh"></i>' + '</span>';
|
||||
$(eid).html(htmlCode);
|
||||
_storeData(_set.storeLable, codeObj);
|
||||
}
|
||||
|
||||
function _setStyle(codeObj) {
|
||||
var fnCodeObj = new Array();
|
||||
var col = new Array('#BF0C43', '#E69A2A', '#707F02', '#18975F', '#BC3087', '#73C841', '#780320', '#90719B', '#1F72D8', '#D6A03C', '#6B486E', '#243F5F', '#16BDB5');
|
||||
var charIndex;
|
||||
for (var i = 0; i < codeObj.length; i++) {
|
||||
charIndex = Math.floor(Math.random() * col.length);
|
||||
fnCodeObj.push('<font color="' + col[charIndex] + '">' + codeObj.charAt(i) + '</font>');
|
||||
}
|
||||
return fnCodeObj.join('');
|
||||
}
|
||||
|
||||
function _createCode(codeType, codeLength) {
|
||||
var codeObj;
|
||||
if (codeType == 'follow') {
|
||||
codeObj = _createCodeFollow(codeLength);
|
||||
} else if (codeType == 'calc') {
|
||||
codeObj = _createCodeCalc(codeLength);
|
||||
} else {
|
||||
codeObj = "";
|
||||
}
|
||||
return codeObj;
|
||||
}
|
||||
|
||||
function _createCodeCalc(codeLength) {
|
||||
var code1, code2, codeResult;
|
||||
var selectChar = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
var charIndex;
|
||||
for (var i = 0; i < codeLength; i++) {
|
||||
charIndex = Math.floor(Math.random() * selectChar.length);
|
||||
code1 += selectChar[charIndex];
|
||||
|
||||
charIndex = Math.floor(Math.random() * selectChar.length);
|
||||
code2 += selectChar[charIndex];
|
||||
}
|
||||
return [parseInt(code1), parseInt(code2), parseInt(code1) + parseInt(code2)];
|
||||
}
|
||||
|
||||
function _createCodeFollow(codeLength) {
|
||||
var code = "";
|
||||
var selectChar = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
|
||||
|
||||
for (var i = 0; i < codeLength; i++) {
|
||||
var charIndex = Math.floor(Math.random() * selectChar.length);
|
||||
if (charIndex % 2 == 0) {
|
||||
code += selectChar[charIndex].toLowerCase();
|
||||
} else {
|
||||
code += selectChar[charIndex];
|
||||
}
|
||||
}
|
||||
return code;
|
||||
}
|
||||
var regUsername = /^[a-zA-Z_][a-zA-Z0-9_]{4,19}$/;
|
||||
var regPasswordSpecial = /[~!@#%&=;':",./<>_\}\]\-\$\(\)\*\+\.\[\?\\\^\{\|]/;
|
||||
var regPasswordAlpha = /[a-zA-Z]/;
|
||||
var regPasswordNum = /[0-9]/;
|
||||
var password;
|
||||
var check = [false, false, false, false];
|
||||
var check1=[false, false, false, false, false];
|
||||
|
||||
//校验成功函数
|
||||
function success(Obj, counter) {
|
||||
Obj.parent().parent().removeClass('has-error').addClass('has-success');
|
||||
$('.tips').eq(counter).hide();
|
||||
$('.fa-check').eq(counter).hide();
|
||||
$('.fa-remove').eq(counter).hide();
|
||||
check[counter] = true;
|
||||
|
||||
}
|
||||
|
||||
// 校验失败函数
|
||||
function fail(Obj, counter, msg) {
|
||||
Obj.parent().parent().removeClass('has-success').addClass('has-error');
|
||||
$('.fa-remove').eq(counter).hide();
|
||||
$('.fa-check').eq(counter).hide();
|
||||
$('.tips').eq(counter).text(msg).show();
|
||||
check[counter] = false;
|
||||
}
|
||||
|
||||
//校验成功函数
|
||||
function success1(Obj, counter) {
|
||||
Obj.parent().parent().removeClass('has-error').addClass('has-success');
|
||||
$('.email-register .tips').eq(counter).hide();
|
||||
$('.email-register .fa-check').eq(counter).hide();
|
||||
$('.email-register .fa-remove').eq(counter).hide();
|
||||
check1[counter] = true;
|
||||
|
||||
}
|
||||
|
||||
// 校验失败函数
|
||||
function fail1(Obj, counter, msg) {
|
||||
Obj.parent().parent().removeClass('has-success').addClass('has-error');
|
||||
$('.email-register .fa-remove').eq(counter).hide();
|
||||
$('.email-register .fa-check').eq(counter).hide();
|
||||
$('.email-register .tips').eq(counter).text(msg).show();
|
||||
check1[counter] = false;
|
||||
}
|
||||
|
||||
|
||||
// 用户名匹配
|
||||
$('.registerBox .mobile_register').find('input').eq(0).change(function() {
|
||||
if (regUsername.test($(this).val())) {
|
||||
success($(this), 0);
|
||||
} else if ($(this).val().length < 5) {
|
||||
fail($(this), 0, '用户名太短,不能少于5个字符');
|
||||
} else {
|
||||
fail($(this), 0, '用户名只能为英文数字和下划线,且不能以数字开头')
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// 手机号码注册
|
||||
var regPhoneNum = /^1+[0-9]{10}$/
|
||||
$('.registerBox .mobile_register').find('input').eq(1).change(function() {
|
||||
if (regPhoneNum.test($(this).val())) {
|
||||
success($(this), 1);
|
||||
} else {
|
||||
fail($(this), 1, '手机号码只能为11位数字且必须为1开头');
|
||||
}
|
||||
});
|
||||
|
||||
//短信验证码
|
||||
var regMsg = /^[0-9]{4}$/
|
||||
$('.registerBox .mobile_register').find('input').eq(2).change(function() {
|
||||
if (check[1]) {
|
||||
if (regMsg.test($(this).val())) {
|
||||
success($(this), 2);
|
||||
} else {
|
||||
fail($(this), 2, '短信验证码错误');
|
||||
}
|
||||
} else {
|
||||
$('.registerBox .mobile_register').find('input').eq(1).parent().parent().removeClass('has-success').addClass('has-error');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('#loadingButton').click(function() {
|
||||
|
||||
if (check[1]) {
|
||||
$(this).removeClass('#loginModal .registerBox .btn-primary').addClass('disabled');
|
||||
|
||||
$(this).html('<span class="red">59</span> 秒后重新获取');
|
||||
var secondObj = $('.registerBox #loadingButton').find('span');
|
||||
var secondObjVal = secondObj.text();
|
||||
|
||||
function secondCounter() {
|
||||
|
||||
var secondTimer = setTimeout(function() {
|
||||
secondObjVal--;
|
||||
secondObj.text(secondObjVal);
|
||||
secondCounter();
|
||||
}, 1000);
|
||||
if (secondObjVal == 0) {
|
||||
clearTimeout(secondTimer);
|
||||
$('.registerBox #loadingButton').text('重新获取校验码');
|
||||
$('.registerBox #loadingButton').removeClass('disabled').addClass('#loginModal .registerBox .btn-primary');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
secondCounter();
|
||||
} else {
|
||||
$('.registerBox .mobile_register').find('input').eq(1).parent().parent().removeClass('has-success').addClass('has-error');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 验证码
|
||||
$.idcode.setCode();
|
||||
|
||||
$('.registerBox .mobile_register').find('input').eq(3).change(function() {
|
||||
var IsBy = $.idcode.validateCode();
|
||||
if (IsBy) {
|
||||
success($(this), 3);
|
||||
} else {
|
||||
fail($(this), 3, '验证码输入错误');
|
||||
}
|
||||
});
|
||||
|
||||
//注册按钮
|
||||
$('.mobile_register #submit').click(function(e) {
|
||||
if (!check.every(function(value) {
|
||||
return value == true
|
||||
})) {
|
||||
e.preventDefault();
|
||||
for (key in check) {
|
||||
if (!check[key]) {
|
||||
$('.registerBox .mobile_register').find('input').eq(key).parent().parent().removeClass('has-success').addClass('has-error')
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//重置按钮
|
||||
//
|
||||
$('.mobile_register #reset').click(function() {
|
||||
$('.registerBox').find('input').slice(0, 4).parent().parent().removeClass('has-error has-success');
|
||||
$('.tips').hide();
|
||||
$('.fa-check').hide();
|
||||
$('.fa-remove').hide();
|
||||
check = [false, false, false, false];
|
||||
});
|
||||
|
||||
|
||||
//邮箱认证
|
||||
$.idcodes = {
|
||||
getCode: function(option) {
|
||||
_commSetting(option);
|
||||
return _storeData(_set.storeLable, null);
|
||||
},
|
||||
setCode: function(option) {
|
||||
_commSetting(option);
|
||||
_setCodeStyles("#" + settings.f, settings.codeType.name, settings.codeType.len);
|
||||
|
||||
},
|
||||
//控制判断验证码的输入
|
||||
validateCode: function(option) {
|
||||
_commSetting(option);
|
||||
var inputV;
|
||||
if (settings.inputIDs) {
|
||||
inputV = $('#'+settings.inputIDs).val();
|
||||
} else {
|
||||
inputV = $(_set.store).val();
|
||||
}
|
||||
//修改的不区分大小写
|
||||
if (inputV.toUpperCase() == $.idcodes.getCode().toUpperCase()) {
|
||||
return true;
|
||||
} else {
|
||||
_setCodeStyles("#" + settings.f, settings.codeType.name, settings.codeType.len);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function _setCodeStyles(eid, codeType, codeLength) {
|
||||
var codeObj = _createCode(settings.codeType.name, settings.codeType.len);
|
||||
var randNum = Math.floor(Math.random() * 6);
|
||||
var htmlCode = '';
|
||||
if (!settings.inputIDs) {
|
||||
htmlCode = '<span><input id="ehong-code-input" type="text" maxlength="4" /></span>';
|
||||
}
|
||||
htmlCode += '<div id="ehong-code" class="ehong-idcode-val ehong-idcode-val';
|
||||
htmlCode += String(randNum);
|
||||
htmlCode += '" href="#" onblur="return false" onfocus="return false" oncontextmenu="return false" onclick="$.idcodes.setCode()">' + _setStyle(codeObj) + '</div>' + '<span id="ehong-code-tip-ck" class="ehong-code-val-tip" onclick="$.idcodes.setCode()">' +'<i class="fa fa-refresh"></i>' + '</span>';
|
||||
$(eid).html(htmlCode);
|
||||
_storeData(_set.storeLable, codeObj);
|
||||
}
|
||||
|
||||
// 用户名匹配
|
||||
$('.registerBox .email-register').find('input').eq(0).change(function() {
|
||||
if (regUsername.test($(this).val())) {
|
||||
success1($(this), 0);
|
||||
} else if ($(this).val().length < 5) {
|
||||
fail1($(this), 0, '用户名太短,不能少于5个字符');
|
||||
} else {
|
||||
fail1($(this), 0, '用户名只能为英文数字和下划线,且不能以数字开头')
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//邮箱认证
|
||||
var regEmailNum = /^[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+){0,4}@[a-zA-Z0-9_-]+\.+([a-zA-Z0-9_-]+){0,4}$/
|
||||
$('.registerBox .email-register').find('input').eq(1).change(function() {
|
||||
if (regEmailNum.test($(this).val())) {
|
||||
success1($(this), 1);
|
||||
} else {
|
||||
fail1($(this), 1, '请输入有效的邮箱');
|
||||
}
|
||||
});
|
||||
|
||||
// 密码匹配
|
||||
|
||||
// 匹配字母、数字、特殊字符至少两种的函数
|
||||
function atLeastTwo(password) {
|
||||
var a = regPasswordSpecial.test(password) ? 1 : 0;
|
||||
var b = regPasswordAlpha.test(password) ? 1 : 0;
|
||||
var c = regPasswordNum.test(password) ? 1 : 0;
|
||||
return a + b + c;
|
||||
|
||||
}
|
||||
|
||||
$('.registerBox .email-register').find('input').eq(2).change(function() {
|
||||
|
||||
password = $(this).val();
|
||||
|
||||
if ($(this).val().length < 6) {
|
||||
fail1($(this), 2, '密码太短,不能少于6个字符');
|
||||
} else {
|
||||
|
||||
|
||||
if (atLeastTwo($(this).val()) < 2) {
|
||||
fail1($(this), 2, '密码中至少包含字母、数字、特殊字符的两种')
|
||||
} else {
|
||||
success1($(this), 2);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// 再次输入密码校验
|
||||
$('.registerBox .email-register').find('input').eq(3).change(function() {
|
||||
|
||||
if ($(this).val() == password) {
|
||||
success1($(this), 3);
|
||||
} else {
|
||||
|
||||
fail1($(this), 3, '两次输入的密码不一致');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// 验证码
|
||||
$.idcodes.setCode();
|
||||
|
||||
$('.registerBox .email-register').find('input').eq(4).change(function() {
|
||||
var IsBys = $.idcodes.validateCode();
|
||||
if (IsBys) {
|
||||
success1($(this), 4);
|
||||
} else {
|
||||
fail1($(this), 4, '验证码输入错误');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//注册按钮
|
||||
$('.email-register #submit').click(function(e) {
|
||||
if (!check1.every(function(value) {
|
||||
return value == true
|
||||
})) {
|
||||
e.preventDefault();
|
||||
for (key in check1) {
|
||||
if (!check1[key]) {
|
||||
$('.registerBox .email-register').find('input').eq(key).parent().parent().removeClass('has-success').addClass('has-error')
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//重置按钮
|
||||
//
|
||||
$('.email-register #reset').click(function() {
|
||||
$('.email-register').find('input').slice(0, 5).parent().parent().removeClass('has-error has-success');
|
||||
$('.tips').hide();
|
||||
$('.fa-check').hide();
|
||||
$('.fa-remove').hide();
|
||||
check1 = [false, false, false, false, false];
|
||||
});
|
||||
|
||||
|
||||
//登录项目
|
||||
|
||||
|
||||
function showLoginForm(){
|
||||
$('.registerBox').fadeOut('fast',function(){
|
||||
$('.loginBox').fadeIn('fast');
|
||||
$('.register-footer').fadeOut('fast',function(){
|
||||
$('.login-footer').fadeIn('fast');
|
||||
});
|
||||
|
||||
$('.modal-title').html('注册 or 登录');
|
||||
});
|
||||
$('.error').removeClass('alert alert-danger').html('');
|
||||
}
|
||||
|
||||
function openLoginModal(){
|
||||
showLoginForm();
|
||||
setTimeout(function(){
|
||||
$('#loginModal').modal('show');
|
||||
}, 230);
|
||||
|
||||
}
|
||||
|
||||
function loginAjax(){
|
||||
/* Remove this comments when moving to server*/
|
||||
// $.post( "login/", function( data ) {
|
||||
// if(data == 1){
|
||||
// window.location.replace("/");
|
||||
// } else {
|
||||
// shakeModal();
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
/* Simulate error message from the server */
|
||||
shakeModal();
|
||||
}
|
||||
|
||||
function shakeModal(){
|
||||
$('#loginModal').addClass('shake');
|
||||
$('.error').addClass('alert alert-danger').html("错误:无效的用户名或密码");
|
||||
$('input[type="password"]').val('');
|
||||
setTimeout( function(){
|
||||
$('#loginModal').removeClass('shake');
|
||||
}, 1000 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
//同问输入费用
|
||||
var pay_money = /^([1-9]\d*|0)(\.\d{1})?$/
|
||||
|
||||
//校验成功函数
|
||||
function success2(Obj, counter) {
|
||||
Obj.parent().parent().removeClass('has-error').addClass('has-success');
|
||||
$('#same-questions .tips').eq(counter).hide();
|
||||
$('#same-questions .fa-check').eq(counter).hide();
|
||||
$('#same-questions .fa-remove').eq(counter).hide();
|
||||
check[counter] = true;
|
||||
|
||||
}
|
||||
|
||||
// 校验失败函数
|
||||
function fail2(Obj, counter, msg) {
|
||||
Obj.parent().parent().removeClass('has-success').addClass('has-error');
|
||||
$('#same-questions .fa-remove').eq(counter).hide();
|
||||
$('#same-questions .fa-check').eq(counter).hide();
|
||||
$('#same-questions .tips').eq(counter).text(msg).show();
|
||||
check[counter] = false;
|
||||
}
|
||||
|
||||
$('#same-questions').find('input').eq(0).change(function() {
|
||||
if (pay_money.test($(this).val())) {
|
||||
success2($(this), 0);
|
||||
}
|
||||
else {
|
||||
fail2($(this), 0, '输入错误,请输入正确的金额,保留小数点后一位。')
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -1,187 +0,0 @@
|
|||
/**
|
||||
* Created by hs on 2017/12/20.
|
||||
*/
|
||||
/*
|
||||
* to-markdown - an HTML to Markdown converter
|
||||
*
|
||||
* Copyright 2011, Dom Christie
|
||||
* Licenced under the MIT licence
|
||||
*
|
||||
*/
|
||||
|
||||
var toMarkdown = function(string) {
|
||||
|
||||
var ELEMENTS = [
|
||||
{
|
||||
patterns: 'p',
|
||||
replacement: function(str, attrs, innerHTML) {
|
||||
return innerHTML ? '\n\n' + innerHTML + '\n' : '';
|
||||
}
|
||||
},
|
||||
{
|
||||
patterns: 'br',
|
||||
type: 'void',
|
||||
replacement: '\n'
|
||||
},
|
||||
{
|
||||
patterns: 'h([1-6])',
|
||||
replacement: function(str, hLevel, attrs, innerHTML) {
|
||||
var hPrefix = '';
|
||||
for(var i = 0; i < hLevel; i++) {
|
||||
hPrefix += '#';
|
||||
}
|
||||
return '\n\n' + hPrefix + ' ' + innerHTML + '\n';
|
||||
}
|
||||
},
|
||||
{
|
||||
patterns: 'hr',
|
||||
type: 'void',
|
||||
replacement: '\n\n* * *\n'
|
||||
},
|
||||
{
|
||||
patterns: 'a',
|
||||
replacement: function(str, attrs, innerHTML) {
|
||||
var href = attrs.match(attrRegExp('href')),
|
||||
title = attrs.match(attrRegExp('title'));
|
||||
return href ? '[' + innerHTML + ']' + '(' + href[1] + (title && title[1] ? ' "' + title[1] + '"' : '') + ')' : str;
|
||||
}
|
||||
},
|
||||
{
|
||||
patterns: ['b', 'strong'],
|
||||
replacement: function(str, attrs, innerHTML) {
|
||||
return innerHTML ? '**' + innerHTML + '**' : '';
|
||||
}
|
||||
},
|
||||
{
|
||||
patterns: ['i', 'em'],
|
||||
replacement: function(str, attrs, innerHTML) {
|
||||
return innerHTML ? '_' + innerHTML + '_' : '';
|
||||
}
|
||||
},
|
||||
{
|
||||
patterns: 'code',
|
||||
replacement: function(str, attrs, innerHTML) {
|
||||
return innerHTML ? '`' + innerHTML + '`' : '';
|
||||
}
|
||||
},
|
||||
{
|
||||
patterns: 'img',
|
||||
type: 'void',
|
||||
replacement: function(str, attrs, innerHTML) {
|
||||
var src = attrs.match(attrRegExp('src')),
|
||||
alt = attrs.match(attrRegExp('alt')),
|
||||
title = attrs.match(attrRegExp('title'));
|
||||
return '![' + (alt && alt[1] ? alt[1] : '') + ']' + '(' + src[1] + (title && title[1] ? ' "' + title[1] + '"' : '') + ')';
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
for(var i = 0, len = ELEMENTS.length; i < len; i++) {
|
||||
if(typeof ELEMENTS[i].patterns === 'string') {
|
||||
string = replaceEls(string, { tag: ELEMENTS[i].patterns, replacement: ELEMENTS[i].replacement, type: ELEMENTS[i].type });
|
||||
}
|
||||
else {
|
||||
for(var j = 0, pLen = ELEMENTS[i].patterns.length; j < pLen; j++) {
|
||||
string = replaceEls(string, { tag: ELEMENTS[i].patterns[j], replacement: ELEMENTS[i].replacement, type: ELEMENTS[i].type });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function replaceEls(html, elProperties) {
|
||||
var pattern = elProperties.type === 'void' ? '<' + elProperties.tag + '\\b([^>]*)\\/?>' : '<' + elProperties.tag + '\\b([^>]*)>([\\s\\S]*?)<\\/' + elProperties.tag + '>',
|
||||
regex = new RegExp(pattern, 'gi'),
|
||||
markdown = '';
|
||||
if(typeof elProperties.replacement === 'string') {
|
||||
markdown = html.replace(regex, elProperties.replacement);
|
||||
}
|
||||
else {
|
||||
markdown = html.replace(regex, function(str, p1, p2, p3) {
|
||||
return elProperties.replacement.call(this, str, p1, p2, p3);
|
||||
});
|
||||
}
|
||||
return markdown;
|
||||
}
|
||||
|
||||
function attrRegExp(attr) {
|
||||
return new RegExp(attr + '\\s*=\\s*["\']?([^"\']*)["\']?', 'i');
|
||||
}
|
||||
|
||||
// Pre code blocks
|
||||
|
||||
string = string.replace(/<pre\b[^>]*>`([\s\S]*)`<\/pre>/gi, function(str, innerHTML) {
|
||||
innerHTML = innerHTML.replace(/^\t+/g, ' '); // convert tabs to spaces (you know it makes sense)
|
||||
innerHTML = innerHTML.replace(/\n/g, '\n ');
|
||||
return '\n\n ' + innerHTML + '\n';
|
||||
});
|
||||
|
||||
// Lists
|
||||
|
||||
// Escape numbers that could trigger an ol
|
||||
// If there are more than three spaces before the code, it would be in a pre tag
|
||||
// Make sure we are escaping the period not matching any character
|
||||
string = string.replace(/^(\s{0,3}\d+)\. /g, '$1\\. ');
|
||||
|
||||
// Converts lists that have no child lists (of same type) first, then works it's way up
|
||||
var noChildrenRegex = /<(ul|ol)\b[^>]*>(?:(?!<ul|<ol)[\s\S])*?<\/\1>/gi;
|
||||
while(string.match(noChildrenRegex)) {
|
||||
string = string.replace(noChildrenRegex, function(str) {
|
||||
return replaceLists(str);
|
||||
});
|
||||
}
|
||||
|
||||
function replaceLists(html) {
|
||||
|
||||
html = html.replace(/<(ul|ol)\b[^>]*>([\s\S]*?)<\/\1>/gi, function(str, listType, innerHTML) {
|
||||
var lis = innerHTML.split('</li>');
|
||||
lis.splice(lis.length - 1, 1);
|
||||
|
||||
for(i = 0, len = lis.length; i < len; i++) {
|
||||
if(lis[i]) {
|
||||
var prefix = (listType === 'ol') ? (i + 1) + ". " : "* ";
|
||||
lis[i] = lis[i].replace(/\s*<li[^>]*>([\s\S]*)/i, function(str, innerHTML) {
|
||||
|
||||
innerHTML = innerHTML.replace(/^\s+/, '');
|
||||
innerHTML = innerHTML.replace(/\n\n/g, '\n\n ');
|
||||
// indent nested lists
|
||||
innerHTML = innerHTML.replace(/\n([ ]*)+(\*|\d+\.) /g, '\n$1 $2 ');
|
||||
return prefix + innerHTML;
|
||||
});
|
||||
}
|
||||
}
|
||||
return lis.join('\n');
|
||||
});
|
||||
return '\n\n' + html.replace(/[ \t]+\n|\s+$/g, '');
|
||||
}
|
||||
|
||||
// Blockquotes
|
||||
var deepest = /<blockquote\b[^>]*>((?:(?!<blockquote)[\s\S])*?)<\/blockquote>/gi;
|
||||
while(string.match(deepest)) {
|
||||
string = string.replace(deepest, function(str) {
|
||||
return replaceBlockquotes(str);
|
||||
});
|
||||
}
|
||||
|
||||
function replaceBlockquotes(html) {
|
||||
html = html.replace(/<blockquote\b[^>]*>([\s\S]*?)<\/blockquote>/gi, function(str, inner) {
|
||||
inner = inner.replace(/^\s+|\s+$/g, '');
|
||||
inner = cleanUp(inner);
|
||||
inner = inner.replace(/^/gm, '> ');
|
||||
inner = inner.replace(/^(>([ \t]{2,}>)+)/gm, '> >');
|
||||
return inner;
|
||||
});
|
||||
return html;
|
||||
}
|
||||
|
||||
function cleanUp(string) {
|
||||
string = string.replace(/^[\t\r\n]+|[\t\r\n]+$/g, ''); // trim leading/trailing whitespace
|
||||
string = string.replace(/\n\s+\n/g, '\n\n');
|
||||
string = string.replace(/\n{3,}/g, '\n\n'); // limit consecutive linebreaks to 2
|
||||
return string;
|
||||
}
|
||||
|
||||
return cleanUp(string);
|
||||
};
|
||||
|
||||
if (typeof exports === 'object') {
|
||||
exports.toMarkdown = toMarkdown;
|
||||
}
|
|
@ -9,7 +9,17 @@
|
|||
* compiled file so the styles you add here take precedence over styles defined in any styles
|
||||
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
||||
* file per style scope.
|
||||
*
|
||||
*= require_tree .
|
||||
*= require_self
|
||||
*/
|
||||
|
||||
// The full list of Bootstrap variables can be found here. You can override these by simply redefining the variable before the @import directive, e.g.:
|
||||
//
|
||||
// $navbar-default-bg: #312312;
|
||||
// $light-orange: #ff8c00;
|
||||
// $navbar-default-color: $light-orange;
|
||||
|
||||
// 你有新的想改的文件请放置在bootstrap最上方
|
||||
|
||||
|
||||
// "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
|
||||
@import "bootstrap-sprockets";
|
||||
@import "bootstrap";
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,261 +0,0 @@
|
|||
.md-editor {
|
||||
display: block;
|
||||
/*border: 1px solid #ddd*/
|
||||
}
|
||||
|
||||
.md-footer {
|
||||
display: block;
|
||||
margin: 10px 5px;
|
||||
padding: 4px 8px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
|
||||
.md-editor ,.md-editor>.md-header {
|
||||
display: block;
|
||||
padding: 2px 3px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
|
||||
.md-editor>.md-header {
|
||||
margin: 0;
|
||||
border-top:1px solid #ddd;
|
||||
border-left:1px solid #ddd;
|
||||
border-right:1px solid #ddd;
|
||||
}
|
||||
|
||||
.md-editor>.md-preview {
|
||||
background: #F8F8F8;
|
||||
border-top: 1px dashed #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-left:1px solid #ddd;
|
||||
border-right:1px solid #ddd;
|
||||
min-height: 10px;
|
||||
overflow: auto;
|
||||
padding:6px 4px;
|
||||
}
|
||||
|
||||
.md-editor blockquote{
|
||||
padding: 8px 16px;
|
||||
margin: 0 0 10px;
|
||||
font-size: 16px;
|
||||
border-left: 3px solid #03A8A8;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
|
||||
.md-editor>textarea {
|
||||
font-family: Menlo,Monaco,Consolas,"Courier New",monospace;
|
||||
font-size: 14px;
|
||||
outline: 0;
|
||||
margin: 0;
|
||||
display: block;
|
||||
padding: 5px 12px;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
border-top: 1px dashed #ddd;
|
||||
border-left:1px solid #ddd;
|
||||
border-right:1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-bottom-left-radius:4px;
|
||||
border-bottom-right-radius:4px;
|
||||
/*border-radius: 0;*/
|
||||
box-shadow: none;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.md-editor>textarea:focus {
|
||||
box-shadow: none;
|
||||
background: #fff
|
||||
}
|
||||
|
||||
.md-editor.active {
|
||||
border-color: #ccc;
|
||||
outline: 0;
|
||||
/*-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);*/
|
||||
/*box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)*/
|
||||
}
|
||||
|
||||
.md-editor .md-controls {
|
||||
float: right;
|
||||
padding: 3px
|
||||
}
|
||||
|
||||
.md-editor .md-controls .md-control {
|
||||
right: 5px;
|
||||
color: #bebebe;
|
||||
padding: 3px 3px 3px 10px
|
||||
}
|
||||
|
||||
.md-editor .md-controls .md-control:hover {
|
||||
color: #333
|
||||
}
|
||||
|
||||
.md-editor.md-fullscreen-mode {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 99999;
|
||||
padding: 60px 30px 15px;
|
||||
background: #fff!important;
|
||||
border: 0!important
|
||||
}
|
||||
|
||||
.md-editor.md-fullscreen-mode .md-footer {
|
||||
display: none
|
||||
}
|
||||
|
||||
.md-editor.md-fullscreen-mode .md-input,.md-editor.md-fullscreen-mode .md-preview {
|
||||
margin: 0 auto!important;
|
||||
height: 100%!important;
|
||||
font-size: 20px!important;
|
||||
padding: 20px!important;
|
||||
color: #999;
|
||||
line-height: 1.6em!important;
|
||||
resize: none!important;
|
||||
box-shadow: none!important;
|
||||
background: #fff!important;
|
||||
border: 0!important
|
||||
}
|
||||
|
||||
.md-editor.md-fullscreen-mode .md-preview {
|
||||
color: #333;
|
||||
overflow: auto
|
||||
}
|
||||
|
||||
.md-preview a{
|
||||
color: #03A8A8 !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.md-editor.md-fullscreen-mode .md-input:focus,.md-editor.md-fullscreen-mode .md-input:hover {
|
||||
color: #333;
|
||||
background: #fff!important
|
||||
}
|
||||
|
||||
.md-editor.md-fullscreen-mode .md-header {
|
||||
padding: 2px 3px;
|
||||
background: 0 0;
|
||||
/*text-align: center;*/
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
top: 20px;
|
||||
border-bottom: 1px dashed #ddd;
|
||||
}
|
||||
|
||||
.md-editor.md-fullscreen-mode .btn-group {
|
||||
float: none
|
||||
}
|
||||
|
||||
.md-editor.md-fullscreen-mode .btn {
|
||||
border: 0;
|
||||
background: 0 0;
|
||||
color: #b3b3b3
|
||||
}
|
||||
|
||||
.md-editor.md-fullscreen-mode .btn.active,.md-editor.md-fullscreen-mode .btn:active,.md-editor.md-fullscreen-mode .btn:focus,.md-editor.md-fullscreen-mode .btn:hover {
|
||||
box-shadow: none;
|
||||
color: #333
|
||||
}
|
||||
|
||||
.md-editor.md-fullscreen-mode .md-fullscreen-controls {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
text-align: right;
|
||||
z-index: 1002;
|
||||
display: block
|
||||
}
|
||||
|
||||
.md-editor.md-fullscreen-mode .md-fullscreen-controls a {
|
||||
color: #b3b3b3;
|
||||
clear: right;
|
||||
margin: 10px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.md-editor.md-fullscreen-mode .md-fullscreen-controls a:hover {
|
||||
color: #333;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.md-editor.md-fullscreen-mode .md-editor {
|
||||
height: 100%!important;
|
||||
position: relative
|
||||
}
|
||||
|
||||
.md-editor .md-fullscreen-controls {
|
||||
display: none
|
||||
}
|
||||
|
||||
.md-nooverflow {
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
/*.md-editor .btn-default:hover{*/
|
||||
/*color:#03A8A8 !important;*/
|
||||
/*background-color: #fff;*/
|
||||
/*}*/
|
||||
|
||||
.md-editor .btn-default{
|
||||
color:#999;
|
||||
}
|
||||
@media(max-width:500px){
|
||||
.md-editor .btn-default{
|
||||
padding:3px 6px !important;
|
||||
}
|
||||
.md-controls{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.md-editor .fa{
|
||||
font-size:14px;
|
||||
}
|
||||
|
||||
textarea::-webkit-input-placeholder,
|
||||
textarea::-moz-placeholder,
|
||||
textarea:-ms-input-placeholder{
|
||||
color:#999;
|
||||
font-weight:normal;
|
||||
font-size:14px;
|
||||
}
|
||||
|
||||
.btn-toolbar{
|
||||
font-size: 0;
|
||||
/*margin: 5px 0;*/
|
||||
padding:5px 5px;
|
||||
}
|
||||
|
||||
.btn-toolbar .btn-group{
|
||||
padding:0 3px;
|
||||
border-right:1px dashed #ddd;
|
||||
}
|
||||
|
||||
|
||||
.btn-toolbar button{
|
||||
padding:4px 8px !important;
|
||||
border-color:#fff !important;
|
||||
}
|
||||
.btn-toolbar button:hover{
|
||||
color:#03A0A8;
|
||||
background-color:#eff0f1;
|
||||
border-radius:4px !important;
|
||||
}
|
||||
|
||||
.btn-toolbar button:focus{
|
||||
color:#03A0A8;
|
||||
background-color:#eff0f1;
|
||||
border-radius:4px !important;
|
||||
outline-color:#eff0f1 !important;
|
||||
}
|
||||
|
||||
.btn-toolbar .fa{
|
||||
font-size:14px;
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -1,30 +0,0 @@
|
|||
/*login页面头部logo*/
|
||||
|
||||
.login-head{
|
||||
margin: 40px 0 20px;
|
||||
text-align:center;
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
.login-head .logo-xs{
|
||||
margin: 20px auto;
|
||||
top: 80px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.login-head a > img{
|
||||
height:80px;
|
||||
}
|
||||
|
||||
.login-head h5{
|
||||
margin: 20px 30px;
|
||||
color:#6f6f6f;
|
||||
line-height:1.5;
|
||||
}
|
||||
|
||||
.login .modal-header .fa-home{
|
||||
font-size:16px !important;
|
||||
color: #cccccc;
|
||||
padding-left:10px;
|
||||
border-left: #ccc solid 1px;
|
||||
}
|
|
@ -1,626 +0,0 @@
|
|||
/* 问题详情页面css*/
|
||||
|
||||
.text-blue{
|
||||
color: #03A8A8 !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
.text-gray{
|
||||
color:#999 !important;
|
||||
}
|
||||
.text-yellow{
|
||||
color:#f99b1d !important;
|
||||
}
|
||||
.text-blue:hover{
|
||||
color: #008080;
|
||||
}
|
||||
.mg5{
|
||||
margin:5px 5px !important;
|
||||
}
|
||||
.mt0{
|
||||
margin-top:0 !important;
|
||||
}
|
||||
|
||||
.mbt5{
|
||||
margin:5px 0 !important;
|
||||
}
|
||||
.mbt10{
|
||||
margin:10px 0 !important;
|
||||
}
|
||||
.mlr5{
|
||||
margin:0 5px !important;
|
||||
}
|
||||
.mlr10{
|
||||
margin:0 10px !important;
|
||||
}
|
||||
.ml5{
|
||||
margin-left:5px !important;
|
||||
}
|
||||
.ml10{
|
||||
margin-left:10px !important;
|
||||
}
|
||||
.mr5{
|
||||
margin-right:5px !important;
|
||||
}
|
||||
.mr10{
|
||||
margin-right:10px !important;
|
||||
}
|
||||
.plr5{
|
||||
padding:0 5px !important;
|
||||
}
|
||||
.plr10{
|
||||
padding:0 10px !important;
|
||||
}
|
||||
.pbt5{
|
||||
padding:5px 0 !important;
|
||||
}
|
||||
.pbt10{
|
||||
padding:10px 0 !important;
|
||||
}
|
||||
.pbt20{
|
||||
padding:20px 0 !important;
|
||||
}
|
||||
.pd5{
|
||||
padding:5px 5px !important;
|
||||
}
|
||||
.pd10{
|
||||
padding:10px 10px !important;
|
||||
}
|
||||
.fs12{
|
||||
font-size: 12px !important;
|
||||
}
|
||||
.fs14{
|
||||
font-size: 14px !important;
|
||||
}
|
||||
.fs16{
|
||||
font-size: 16px !important;
|
||||
}
|
||||
.fs18{
|
||||
font-size: 18px !important;
|
||||
}
|
||||
.inline-block{
|
||||
display: inline-block;
|
||||
}
|
||||
.tagcollect{
|
||||
margin: 5px 5px;
|
||||
}
|
||||
.questions-content{
|
||||
background-color: #fff;
|
||||
padding:10px 0;
|
||||
}
|
||||
.ques-header{
|
||||
padding-top:20px;
|
||||
border-bottom: solid 1px #e0e0e0;
|
||||
}
|
||||
|
||||
.ques-head-footer{
|
||||
margin:10px 0;
|
||||
}
|
||||
|
||||
/*.ques-header{*/
|
||||
|
||||
/*border-bottom: 1px solid #eee;*/
|
||||
/*}*/
|
||||
|
||||
.ques-header .ques-head-title{
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
color:#333;
|
||||
}
|
||||
.ques-header .ques-follow strong{
|
||||
color:#333;
|
||||
}
|
||||
.clear{
|
||||
clear: both;
|
||||
}
|
||||
@media(max-width: 600px){
|
||||
.ques-follow li > h3,
|
||||
.ques-follow li > h4{
|
||||
font-size: 16px !important;
|
||||
}
|
||||
}
|
||||
.ques-follow li{
|
||||
/*display: inline-block;*/
|
||||
/*font-size: 18px;*/
|
||||
}
|
||||
.questions-desc{
|
||||
font-size:14px !important;
|
||||
/*border-bottom:solid 1px #e0e0e0;*/
|
||||
}
|
||||
.questions-desc .fa{
|
||||
font-size:14px !important;
|
||||
}
|
||||
.questions-desc ul{
|
||||
display: inline-block;
|
||||
}
|
||||
.questions-desc ul li{
|
||||
list-style: none;
|
||||
float:left;
|
||||
padding:0 10px 0 5px;
|
||||
border-left:solid 3px #03A8A8;
|
||||
}
|
||||
|
||||
|
||||
.ques-body-content{
|
||||
line-height: 2;
|
||||
word-wrap: break-word;
|
||||
/*border-bottom: solid 1px #eee;*/
|
||||
}
|
||||
.ques-title-first,
|
||||
.ques-title-second{
|
||||
border-left: solid 3px #03A8A8;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.codetool-show{
|
||||
position: relative;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.codetool-show .fa{
|
||||
font-size:16px !important;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.codetool-show--inner {
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
height: 24px;
|
||||
background-color: #333;
|
||||
padding: 0 5px;
|
||||
border:1px solid #999;
|
||||
border-radius:4px;
|
||||
color:#f8f8f8;
|
||||
}
|
||||
.codetool-show--inner .code-tool {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
float: left;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
background-size: auto 16px;
|
||||
margin: 2px 5px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.quescode{
|
||||
border: none;
|
||||
overflow: auto;
|
||||
max-height: 35em;
|
||||
}
|
||||
|
||||
.quescode code{
|
||||
overflow-wrap: normal;
|
||||
white-space: inherit;
|
||||
float:left;
|
||||
|
||||
}
|
||||
.ques-body{
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.ques-body-hidden{
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 0 0 25px;
|
||||
margin-top: -250px;
|
||||
text-align: center;
|
||||
background: -moz-linear-gradient(bottom,rgba(255,255,255,1),rgba(255,255,255,0));
|
||||
background: -webkit-gradient(linear,0 top,0 bottom,from(rgba(255,255,255,0)),to(#fff));
|
||||
background: -o-linear-gradient(bottom,rgba(255,255,255,.1),rgba(255,255,255,0));
|
||||
|
||||
}
|
||||
|
||||
.ques-body-hidden .read_more_mask{
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.ques-body-hidden .read_more_mask .read_more_btn{
|
||||
border: 1px solid #de686d;
|
||||
}
|
||||
.ques-body-hidden .readall_box_nobg{
|
||||
background: rgba(0,0,0,0);
|
||||
background: -moz-linear-gradient(bottom,rgba(0,0,0,.1),rgba(0,0,0,0));
|
||||
background: -webkit-gradient(linear,0 top,0 center,from(rgba(0,0,0,.1)),to(rgba(0,0,0,0)));
|
||||
background: -o-linear-gradient(bottom,rgba(0,0,0,.1),rgba(0,0,0,0));
|
||||
}
|
||||
|
||||
.article_Hide {
|
||||
height:100px;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.read_more_btn{
|
||||
color: #03A8A8;
|
||||
background: #fff;
|
||||
border: 1px solid #03A8A8 !important;
|
||||
}
|
||||
.read_more_btn:hover{
|
||||
background: #03A8A8;
|
||||
color:#fff !important;
|
||||
}
|
||||
.article_copyright{
|
||||
font-size: 14px;
|
||||
color: #788087;
|
||||
clear: both;
|
||||
overflow: hidden;
|
||||
padding: 10px 20px 30px 15px;
|
||||
background-color: #fff;
|
||||
margin-top: -10px;
|
||||
}
|
||||
/* 举报模态框----没做完*/
|
||||
|
||||
.tip-offs .modal-header{
|
||||
border: 0 none;
|
||||
padding: 15px 15px 15px;
|
||||
background-color: #eeeeee;
|
||||
border-radius: 6px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tip-offs .alert{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.reportreason:after{
|
||||
content: " *";
|
||||
color: #dc3236;
|
||||
|
||||
}
|
||||
body .btn-primary{
|
||||
background-color: #03A8A8;
|
||||
color: #fff ;
|
||||
border-color: #03A8A8 ;
|
||||
}
|
||||
body .btn-primary:hover,
|
||||
body .btn-primary:active,
|
||||
body .btn-primary:focus{
|
||||
background-color: #008080 !important;
|
||||
color: #fff !important;
|
||||
border-color:#008080 !important;
|
||||
}
|
||||
|
||||
/* 同问费用弹出框css,该js在regist_login.js中*/
|
||||
|
||||
#same-questions .tips{
|
||||
color:#dc3236;
|
||||
}
|
||||
|
||||
#same-questions .text-muted{
|
||||
line-height: 1.6;
|
||||
font-size:13px;
|
||||
}
|
||||
|
||||
/* 问题详情页回答问题的css*/
|
||||
|
||||
.answer-ques{
|
||||
padding-top:20px;
|
||||
margin:30px 0;
|
||||
border-top:dashed 2px #ccc;
|
||||
}
|
||||
|
||||
|
||||
.answer-ques #img_modal .tab-content > .active{
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.answer-ques #img_modal .upload__file{
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
width: 85%;
|
||||
height: 100%;
|
||||
z-index: 10;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/*.answer-content{*/
|
||||
/*!*border:solid 1px #ccc;*!*/
|
||||
/*border-radius:4px;*/
|
||||
/*}*/
|
||||
|
||||
.markdown-toolbar{
|
||||
font-size: 0;
|
||||
/*margin: 5px 0;*/
|
||||
padding:5px 5px;
|
||||
}
|
||||
|
||||
.markdown-toolbar .btn-group{
|
||||
padding:0 3px;
|
||||
border-right:1px dashed #ddd;
|
||||
}
|
||||
|
||||
.markdown-toolbar .dropdown-menu{
|
||||
min-width:80px !important;
|
||||
}
|
||||
.markdown-toolbar .dropdown-menu li{
|
||||
border-bottom: solid 1px #ccc;
|
||||
}
|
||||
.markdown-toolbar .dropdown-menu li > a:hover{
|
||||
color:#03A0A8;
|
||||
}
|
||||
|
||||
.markdown-toolbar button{
|
||||
color:#999;
|
||||
padding:3px 5px !important;
|
||||
}
|
||||
.markdown-toolbar button:hover{
|
||||
color:#03A0A8;
|
||||
background-color:#eff0f1;
|
||||
border-radius:4px !important;
|
||||
}
|
||||
|
||||
.markdown-toolbar button:focus{
|
||||
color:#03A0A8;
|
||||
background-color:#eff0f1;
|
||||
border-radius:4px !important;
|
||||
outline-color:#eff0f1 !important;
|
||||
}
|
||||
|
||||
.markdown-toolbar .fa{
|
||||
font-size:14px;
|
||||
}
|
||||
.answer-content > textarea{
|
||||
/*font-family: Menlo,Monaco,Consolas,"Courier New",monospace;*/
|
||||
font-size: 14px;
|
||||
outline: 0;
|
||||
margin: 0;
|
||||
display: block;
|
||||
padding: 8px 12px;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
border-top: 1px dashed #ddd;
|
||||
box-shadow: none;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
|
||||
/* 问题详情页 回答里的图片插入css */
|
||||
.btn-file {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.btn-file > input {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
font-size: 23px;
|
||||
cursor: pointer;
|
||||
filter: alpha(opacity=0);
|
||||
opacity: 0;
|
||||
|
||||
direction: ltr;
|
||||
}
|
||||
.fileinput {
|
||||
display: inline-block;
|
||||
margin-bottom: 9px;
|
||||
margin-left:20px;
|
||||
}
|
||||
.fileinput .form-control {
|
||||
display: inline-block;
|
||||
padding-top: 7px;
|
||||
padding-bottom: 5px;
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
cursor: text;
|
||||
}
|
||||
.fileinput .thumbnail {
|
||||
display: inline-block;
|
||||
margin-bottom: 5px;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.fileinput .thumbnail > img {
|
||||
max-height: 100%;
|
||||
}
|
||||
.fileinput .btn {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.fileinput-exists .fileinput-new,
|
||||
.fileinput-new .fileinput-exists {
|
||||
display: none;
|
||||
}
|
||||
.fileinput-inline .fileinput-controls {
|
||||
display: inline;
|
||||
}
|
||||
.fileinput-filename {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.form-control .fileinput-filename {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.fileinput.input-group {
|
||||
display: table;
|
||||
}
|
||||
.fileinput.input-group > * {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
.fileinput.input-group > .btn-file {
|
||||
z-index: 1;
|
||||
}
|
||||
.fileinput-new.input-group .btn-file,
|
||||
.fileinput-new .input-group .btn-file {
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
.fileinput-new.input-group .btn-file.btn-xs,
|
||||
.fileinput-new .input-group .btn-file.btn-xs,
|
||||
.fileinput-new.input-group .btn-file.btn-sm,
|
||||
.fileinput-new .input-group .btn-file.btn-sm {
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
.fileinput-new.input-group .btn-file.btn-lg,
|
||||
.fileinput-new .input-group .btn-file.btn-lg {
|
||||
border-radius: 0 6px 6px 0;
|
||||
}
|
||||
.form-group.has-warning .fileinput .fileinput-preview {
|
||||
color: #8a6d3b;
|
||||
}
|
||||
.form-group.has-warning .fileinput .thumbnail {
|
||||
border-color: #faebcc;
|
||||
}
|
||||
.form-group.has-error .fileinput .fileinput-preview {
|
||||
color: #a94442;
|
||||
}
|
||||
.form-group.has-error .fileinput .thumbnail {
|
||||
border-color: #ebccd1;
|
||||
}
|
||||
.form-group.has-success .fileinput .fileinput-preview {
|
||||
color: #3c763d;
|
||||
}
|
||||
.form-group.has-success .fileinput .thumbnail {
|
||||
border-color: #d6e9c6;
|
||||
}
|
||||
.input-group-addon:not(:first-child) {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.img_upload .tab-content{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#localimg .img_chooses{
|
||||
/*float:right;*/
|
||||
margin:5px 10px;
|
||||
}
|
||||
|
||||
#remoteimg {
|
||||
width:100%;
|
||||
}
|
||||
|
||||
/* 问题详情页 右侧作者css */
|
||||
.user_info{
|
||||
border-bottom:1px dashed #ddd;
|
||||
padding:20px 0 10px 0;
|
||||
}
|
||||
.user_info_details {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin:5px 5px;
|
||||
padding:2px 5px;
|
||||
}
|
||||
|
||||
.user_info_details h4 > a{
|
||||
color:#333 !important;
|
||||
font-weight:700;
|
||||
|
||||
}
|
||||
|
||||
.user_info_details a:hover{
|
||||
color:#03A8A8 !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.user_info_details .btn-default{
|
||||
border-color: #03A8A8;
|
||||
}
|
||||
|
||||
.user_info_num {
|
||||
margin-top:15px;
|
||||
text-align: center;
|
||||
display:inline-block;
|
||||
}
|
||||
|
||||
.user_info_num dl,.user_info_num a{
|
||||
display: inline-block;
|
||||
width: 22%;
|
||||
text-align: center;
|
||||
margin-bottom:15px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.user_info_num dt{
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
margin-bottom: 6px;
|
||||
font-weight:400;
|
||||
}
|
||||
|
||||
.user_info_num dd{
|
||||
color: #444;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.user_descriptions,.user_hot_tags{
|
||||
padding:20px 0 10px 0;
|
||||
border-bottom: 1px dashed #ddd;
|
||||
}
|
||||
.user_desc_header .fs16{
|
||||
border-left: 3px solid #03A8A8;
|
||||
padding-left: 6px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.user_desc_header{
|
||||
margin-bottom:10px;
|
||||
}
|
||||
|
||||
|
||||
/* 提问页面css */
|
||||
|
||||
|
||||
.ask_content{
|
||||
padding:24px 5px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
#ask_questions{
|
||||
padding:10px 5px;
|
||||
}
|
||||
|
||||
#ask_questions .input-group{
|
||||
padding:10px 5px;
|
||||
}
|
||||
#ask_questions .ask_tags{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
#ask_questions .tags_select{
|
||||
width:12%;
|
||||
float:left;
|
||||
}
|
||||
|
||||
#ask_questions .tags_input{
|
||||
display: inline-block;
|
||||
float: right;
|
||||
width: 87%;
|
||||
}
|
||||
|
||||
#ask_questions .ask_pay_time .input-group{
|
||||
float:left;
|
||||
}
|
||||
|
||||
#ask_questions label::after{
|
||||
content: " *";
|
||||
color: #ED1C24;
|
||||
}
|
||||
|
||||
.how_to_ask_title{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ask_title_1{
|
||||
padding:8px 4px;
|
||||
border-left:2px solid #03A8A8;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.ask_pay_time .form-group{
|
||||
padding:0 0 !important;
|
||||
}
|
||||
|
Loading…
Reference in New Issue