Compare commits

..

No commits in common. "master" and "0.2" have entirely different histories.
master ... 0.2

373 changed files with 5041 additions and 61649 deletions

2
.gitignore vendored
View file

@ -2,5 +2,3 @@
.DS_Store
.spyderproject
reports/
.idea/workspace.xml
.idea/rockviewer.iml

1
.idea/.name generated
View file

@ -1 +0,0 @@
rockviewer

165
.idea/dataSources.ids generated
View file

@ -1,165 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<component name="dataSourceStorage">
<data-source source="LOCAL" name="Django default" product="SQLite" version="3.7.6.3" jdbc-version="2.1" driver-name="SQLiteJDBC" driver-version="native" uuid="7e6a0f4c-659f-4195-8d38-0f33b1a39655">
<case-sensitivity plain-identifiers="mixed" quoted-identifiers="mixed"/>
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/db.sqlite3</jdbc-url>
<libraries>
<library>
<url>file://$USER_HOME$/.PyCharm30/config/jdbc-drivers/xerial-sqlite-license.txt</url>
</library>
<library>
<url>file://$USER_HOME$/.PyCharm30/config/jdbc-drivers/sqlite-jdbc-3.7.6.3-20110609.081603-3.jar</url>
</library>
</libraries>
<schema name="" catalog=""/>
<table name="auth_group" schema="" catalog="" type="TABLE">
<column name="id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="name" sqlType="VARCHAR(80)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<primary-key columns="id"/>
<exported-key name="#FAKE_auth_user_groups_1" table="auth_user_groups" schema="" catalog="" columns="group_id"/>
</table>
<table name="auth_group_permissions" schema="" catalog="" type="TABLE">
<column name="id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="group_id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="permission_id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<primary-key columns="id"/>
<foreign-key name="#FAKE_auth_group_permissions_1" columns="permission_id" ref-table="auth_permission" ref-schema="" ref-catalog="" ref-columns="id" update-rule="3" delete-rule="3" deferrability="1"/>
<index name="auth_group_permissions_83d7f98b" unique="true" columns="permission_id"/>
<index name="auth_group_permissions_5f412f9a" unique="true" columns="group_id"/>
</table>
<table name="auth_permission" schema="" catalog="" type="TABLE">
<column name="id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="name" sqlType="VARCHAR(50)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="content_type_id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="codename" sqlType="VARCHAR(100)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<primary-key columns="id"/>
<exported-key name="#FAKE_auth_group_permissions_1" table="auth_group_permissions" schema="" catalog="" columns="permission_id"/>
<exported-key name="#FAKE_auth_user_user_permissions_1" table="auth_user_user_permissions" schema="" catalog="" columns="permission_id"/>
<index name="auth_permission_37ef4eb4" unique="true" columns="content_type_id"/>
</table>
<table name="auth_user" schema="" catalog="" type="TABLE">
<column name="id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="password" sqlType="VARCHAR(128)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="last_login" sqlType="DATETIME" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="is_superuser" sqlType="BOOL" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="username" sqlType="VARCHAR(30)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="first_name" sqlType="VARCHAR(30)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="last_name" sqlType="VARCHAR(30)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="email" sqlType="VARCHAR(75)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="is_staff" sqlType="BOOL" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="is_active" sqlType="BOOL" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="date_joined" sqlType="DATETIME" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<primary-key columns="id"/>
<exported-key name="#FAKE_django_admin_log_2" table="django_admin_log" schema="" catalog="" columns="user_id"/>
</table>
<table name="auth_user_groups" schema="" catalog="" type="TABLE">
<column name="id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="user_id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="group_id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<primary-key columns="id"/>
<foreign-key name="#FAKE_auth_user_groups_1" columns="group_id" ref-table="auth_group" ref-schema="" ref-catalog="" ref-columns="id" update-rule="3" delete-rule="3" deferrability="1"/>
<index name="auth_user_groups_5f412f9a" unique="true" columns="group_id"/>
<index name="auth_user_groups_6340c63c" unique="true" columns="user_id"/>
</table>
<table name="auth_user_user_permissions" schema="" catalog="" type="TABLE">
<column name="id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="user_id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="permission_id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<primary-key columns="id"/>
<foreign-key name="#FAKE_auth_user_user_permissions_1" columns="permission_id" ref-table="auth_permission" ref-schema="" ref-catalog="" ref-columns="id" update-rule="3" delete-rule="3" deferrability="1"/>
<index name="auth_user_user_permissions_83d7f98b" unique="true" columns="permission_id"/>
<index name="auth_user_user_permissions_6340c63c" unique="true" columns="user_id"/>
</table>
<table name="django_admin_log" schema="" catalog="" type="TABLE">
<column name="id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="action_time" sqlType="DATETIME" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="user_id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="content_type_id" sqlType="INTEGER" length="2000000000" precision="10" nullable="true" jdbcType="4"/>
<column name="object_id" sqlType="TEXT" length="2000000000" precision="10" nullable="true" jdbcType="12"/>
<column name="object_repr" sqlType="VARCHAR(200)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="action_flag" sqlType="SMALLINT UNSIGNED" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="change_message" sqlType="TEXT" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<primary-key columns="id"/>
<foreign-key name="#FAKE_django_admin_log_1" columns="content_type_id" ref-table="django_content_type" ref-schema="" ref-catalog="" ref-columns="id" update-rule="3" delete-rule="3" deferrability="1"/>
<foreign-key name="#FAKE_django_admin_log_2" columns="user_id" ref-table="auth_user" ref-schema="" ref-catalog="" ref-columns="id" update-rule="3" delete-rule="3" deferrability="1"/>
<index name="django_admin_log_37ef4eb4" unique="true" columns="content_type_id"/>
<index name="django_admin_log_6340c63c" unique="true" columns="user_id"/>
</table>
<table name="django_content_type" schema="" catalog="" type="TABLE">
<column name="id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="name" sqlType="VARCHAR(100)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="app_label" sqlType="VARCHAR(100)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="model" sqlType="VARCHAR(100)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<primary-key columns="id"/>
<exported-key name="#FAKE_django_admin_log_1" table="django_admin_log" schema="" catalog="" columns="content_type_id"/>
</table>
<table name="django_session" schema="" catalog="" type="TABLE">
<column name="session_key" sqlType="VARCHAR(40)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="session_data" sqlType="TEXT" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="expire_date" sqlType="DATETIME" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<primary-key columns="session_key"/>
<index name="django_session_b7b81f0c" unique="true" columns="expire_date"/>
</table>
<table name="django_site" schema="" catalog="" type="TABLE">
<column name="id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="domain" sqlType="VARCHAR(100)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="name" sqlType="VARCHAR(50)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<primary-key columns="id"/>
</table>
<table name="south_migrationhistory" schema="" catalog="" type="TABLE">
<column name="id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="app_name" sqlType="VARCHAR(255)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="migration" sqlType="VARCHAR(255)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="applied" sqlType="DATETIME" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<primary-key columns="id"/>
</table>
<table name="three_d_viewer_answer" schema="" catalog="" type="TABLE">
<column name="id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="text" sqlType="VARCHAR(2000)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="correct" sqlType="BOOL" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="question_id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<primary-key columns="id"/>
<index name="three_d_viewer_answer_25110688" unique="true" columns="question_id"/>
</table>
<table name="three_d_viewer_category" schema="" catalog="" type="TABLE">
<column name="id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="name" sqlType="VARCHAR(100)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="active" sqlType="BOOL" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="parent_id" sqlType="INTEGER" length="2000000000" precision="10" nullable="true" jdbcType="4"/>
<primary-key columns="id"/>
<index name="three_d_viewer_category_410d0aac" unique="true" columns="parent_id"/>
</table>
<table name="three_d_viewer_mineral" schema="" catalog="" type="TABLE">
<column name="streak" sqlType="VARCHAR(100)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="habit" sqlType="VARCHAR(1000)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="lustre" sqlType="VARCHAR(100)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="colour" sqlType="VARCHAR(100)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="sample_ptr_id" sqlType="INTEGER" length="2000000000" precision="10" nullable="true" jdbcType="4"/>
<column name="cleavage_fracture" sqlType="VARCHAR(100)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="identifying_features" sqlType="VARCHAR(1000)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="specific_gravity" sqlType="DECIMAL" length="2000000000" precision="10" nullable="true" jdbcType="6"/>
<column name="occurance" sqlType="VARCHAR(1000)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="crystallography" sqlType="VARCHAR(100)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="hardness" sqlType="DECIMAL" length="2000000000" precision="10" nullable="true" jdbcType="6"/>
<column name="chemical_formula" sqlType="VARCHAR(100)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<primary-key columns="sample_ptr_id"/>
</table>
<table name="three_d_viewer_question" schema="" catalog="" type="TABLE">
<column name="id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="text" sqlType="VARCHAR(2000)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="sample_id" sqlType="INTEGER" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<primary-key columns="id"/>
<index name="three_d_viewer_question_95642b83" unique="true" columns="sample_id"/>
</table>
<table name="three_d_viewer_sample" schema="" catalog="" type="TABLE">
<column name="description" sqlType="VARCHAR(2000)" length="2000000000" precision="10" nullable="true" jdbcType="12"/>
<column name="model_filename" sqlType="VARCHAR(1000)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<column name="parent_id" sqlType="INTEGER" length="2000000000" precision="10" nullable="true" jdbcType="4"/>
<column name="active" sqlType="BOOL" length="2000000000" precision="10" nullable="false" jdbcType="4"/>
<column name="id" sqlType="INTEGER" length="2000000000" precision="10" nullable="true" jdbcType="4"/>
<column name="name" sqlType="VARCHAR(100)" length="2000000000" precision="10" nullable="false" jdbcType="12"/>
<primary-key columns="id"/>
</table>
</data-source>
</component>

19
.idea/dataSources.xml generated
View file

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" hash="1501324042">
<data-source source="LOCAL" name="Django default" uuid="7e6a0f4c-659f-4195-8d38-0f33b1a39655">
<driver-ref>sqlite.xerial</driver-ref>
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
<jdbc-url>jdbc:sqlite:H:\GitHub\rockviewer\db.sqlite3</jdbc-url>
<libraries>
<library>
<url>file://$USER_HOME$/.PyCharm30/config/jdbc-drivers/xerial-sqlite-license.txt</url>
</library>
<library>
<url>file://$USER_HOME$/.PyCharm30/config/jdbc-drivers/sqlite-jdbc-3.7.6.3-20110609.081603-3.jar</url>
</library>
</libraries>
</data-source>
</component>
</project>

5
.idea/encodings.xml generated
View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>

5
.idea/misc.xml generated
View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7.5 virtualenv at C:\Envs\rockviewer" project-jdk-type="Python SDK" />
</project>

9
.idea/modules.xml generated
View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/rockviewer.iml" filepath="$PROJECT_DIR$/.idea/rockviewer.iml" />
</modules>
</component>
</project>

24
.idea/rockviewer.iml generated
View file

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="FacetManager">
<facet type="django" name="Django">
<configuration>
<option name="rootFolder" value="$MODULE_DIR$" />
<option name="settingsModule" value="settings.py" />
<option name="manageScript" value="manage.py" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 2.7.5 virtualenv at C:\Envs\rockviewer" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="myDocStringFormat" value="Plain" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Django" />
</component>
</module>

View file

@ -1,5 +0,0 @@
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>

7
.idea/vcs.xml generated
View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

1003
.idea/workspace.xml generated

File diff suppressed because it is too large Load diff

View file

@ -424,8 +424,7 @@ textarea {
vertical-align: top !important;
}
input[type=text], input[type=password], input[type=email], input[type=url], input[type=number],
textarea, select, .vTextField {
input[type=text], input[type=password], textarea, select, .vTextField {
border: 1px solid #ccc;
}

View file

@ -32,10 +32,6 @@
padding-right: 1em;
}
#changelist-form .results {
overflow-x: auto;
}
#changelist .toplinks {
border-bottom: 1px solid #ccc !important;
}

View file

@ -23,8 +23,8 @@ ul.actionlist li {
list-style-type: none;
}
ul.actionlist li {
ul.actionlist li.changelink {
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
}

View file

@ -65,7 +65,6 @@ form ul.inline li {
padding: 3px 10px 0 0;
float: left;
width: 8em;
word-wrap: break-word;
}
.aligned ul label {

View file

@ -29,20 +29,17 @@ body.login {
}
.login .form-row label {
float: left;
width: 9em;
padding-right: 0.5em;
line-height: 2em;
text-align: right;
font-size: 1em;
clear: both;
color: #333;
}
.login .form-row #id_username, .login .form-row #id_password {
clear: both;
padding: 6px;
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 14em;
}
.login span.help {

View file

@ -1,18 +1,18 @@
/* SELECTOR (FILTER INTERFACE) */
.selector {
width: 840px;
width: 580px;
float: left;
}
.selector select {
width: 400px;
width: 270px;
height: 17.2em;
}
.selector-available, .selector-chosen {
float: left;
width: 400px;
width: 270px;
text-align: center;
margin-bottom: 5px;
}
@ -48,7 +48,7 @@
}
.selector .selector-available input {
width: 360px;
width: 230px;
}
.selector ul.selector-chooser {

View file

@ -9,7 +9,7 @@
} else {
reset();
}
$(actionCheckboxes).prop("checked", checked)
$(actionCheckboxes).attr("checked", checked)
.parent().parent().toggleClass(options.selectedClass, checked);
},
updateCounter = function() {
@ -19,7 +19,7 @@
sel: sel,
cnt: _actions_icnt
}, true));
$(options.allToggle).prop("checked", function() {
$(options.allToggle).attr("checked", function() {
if (sel == actionCheckboxes.length) {
value = true;
showQuestion();
@ -64,7 +64,7 @@
}
});
$(options.allToggle).show().click(function() {
checker($(this).prop("checked"));
checker($(this).attr("checked"));
updateCounter();
});
$("div.actions span.question a").click(function(event) {
@ -74,7 +74,7 @@
});
$("div.actions span.clear a").click(function(event) {
event.preventDefault();
$(options.allToggle).prop("checked", false);
$(options.allToggle).attr("checked", false);
clearAcross();
checker(0);
updateCounter();
@ -85,14 +85,14 @@
var target = event.target ? event.target : event.srcElement;
if (lastChecked && $.data(lastChecked) != $.data(target) && event.shiftKey === true) {
var inrange = false;
$(lastChecked).prop("checked", target.checked)
$(lastChecked).attr("checked", target.checked)
.parent().parent().toggleClass(options.selectedClass, target.checked);
$(actionCheckboxes).each(function() {
if ($.data(this) == $.data(lastChecked) || $.data(this) == $.data(target)) {
inrange = (inrange) ? false : true;
}
if (inrange) {
$(this).prop("checked", target.checked)
$(this).attr("checked", target.checked)
.parent().parent().toggleClass(options.selectedClass, target.checked);
}
});

View file

@ -1,6 +1,6 @@
(function(a){a.fn.actions=function(n){var b=a.extend({},a.fn.actions.defaults,n),e=a(this),g=false,k=function(c){c?i():j();a(e).prop("checked",c).parent().parent().toggleClass(b.selectedClass,c)},f=function(){var c=a(e).filter(":checked").length;a(b.counterContainer).html(interpolate(ngettext("%(sel)s of %(cnt)s selected","%(sel)s of %(cnt)s selected",c),{sel:c,cnt:_actions_icnt},true));a(b.allToggle).prop("checked",function(){if(c==e.length){value=true;i()}else{value=false;l()}return value})},i=
(function(a){a.fn.actions=function(n){var b=a.extend({},a.fn.actions.defaults,n),e=a(this),g=false,k=function(c){c?i():j();a(e).attr("checked",c).parent().parent().toggleClass(b.selectedClass,c)},f=function(){var c=a(e).filter(":checked").length;a(b.counterContainer).html(interpolate(ngettext("%(sel)s of %(cnt)s selected","%(sel)s of %(cnt)s selected",c),{sel:c,cnt:_actions_icnt},true));a(b.allToggle).attr("checked",function(){if(c==e.length){value=true;i()}else{value=false;l()}return value})},i=
function(){a(b.acrossClears).hide();a(b.acrossQuestions).show();a(b.allContainer).hide()},m=function(){a(b.acrossClears).show();a(b.acrossQuestions).hide();a(b.actionContainer).toggleClass(b.selectedClass);a(b.allContainer).show();a(b.counterContainer).hide()},j=function(){a(b.acrossClears).hide();a(b.acrossQuestions).hide();a(b.allContainer).hide();a(b.counterContainer).show()},l=function(){j();a(b.acrossInput).val(0);a(b.actionContainer).removeClass(b.selectedClass)};a(b.counterContainer).show();
a(this).filter(":checked").each(function(){a(this).parent().parent().toggleClass(b.selectedClass);f();a(b.acrossInput).val()==1&&m()});a(b.allToggle).show().click(function(){k(a(this).prop("checked"));f()});a("div.actions span.question a").click(function(c){c.preventDefault();a(b.acrossInput).val(1);m()});a("div.actions span.clear a").click(function(c){c.preventDefault();a(b.allToggle).prop("checked",false);l();k(0);f()});lastChecked=null;a(e).click(function(c){if(!c)c=window.event;var d=c.target?
c.target:c.srcElement;if(lastChecked&&a.data(lastChecked)!=a.data(d)&&c.shiftKey===true){var h=false;a(lastChecked).prop("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked);a(e).each(function(){if(a.data(this)==a.data(lastChecked)||a.data(this)==a.data(d))h=h?false:true;h&&a(this).prop("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked)})}a(d).parent().parent().toggleClass(b.selectedClass,d.checked);lastChecked=d;f()});a("form#changelist-form table#result_list tr").find("td:gt(0) :input").change(function(){g=
a(this).filter(":checked").each(function(){a(this).parent().parent().toggleClass(b.selectedClass);f();a(b.acrossInput).val()==1&&m()});a(b.allToggle).show().click(function(){k(a(this).attr("checked"));f()});a("div.actions span.question a").click(function(c){c.preventDefault();a(b.acrossInput).val(1);m()});a("div.actions span.clear a").click(function(c){c.preventDefault();a(b.allToggle).attr("checked",false);l();k(0);f()});lastChecked=null;a(e).click(function(c){if(!c)c=window.event;var d=c.target?
c.target:c.srcElement;if(lastChecked&&a.data(lastChecked)!=a.data(d)&&c.shiftKey===true){var h=false;a(lastChecked).attr("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked);a(e).each(function(){if(a.data(this)==a.data(lastChecked)||a.data(this)==a.data(d))h=h?false:true;h&&a(this).attr("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked)})}a(d).parent().parent().toggleClass(b.selectedClass,d.checked);lastChecked=d;f()});a("form#changelist-form table#result_list tr").find("td:gt(0) :input").change(function(){g=
true});a('form#changelist-form button[name="index"]').click(function(){if(g)return confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost."))});a('form#changelist-form input[name="_save"]').click(function(){var c=false;a("div.actions select option:selected").each(function(){if(a(this).val())c=true});if(c)return g?confirm(gettext("You have selected an action, but you haven't saved your changes to individual fields yet. Please click OK to save. You'll need to re-run the action.")):
confirm(gettext("You have selected an action, and you haven't made any changes on individual fields. You're probably looking for the Go button rather than the Save button."))})};a.fn.actions.defaults={actionContainer:"div.actions",counterContainer:"span.action-counter",allContainer:"div.actions span.all",acrossInput:"div.actions input.select-across",acrossQuestions:"div.actions span.question",acrossClears:"div.actions span.clear",allToggle:"#action-toggle",selectedClass:"selected"}})(django.jQuery);

View file

@ -6,8 +6,6 @@ var DateTimeShortcuts = {
calendars: [],
calendarInputs: [],
clockInputs: [],
dismissClockFunc: [],
dismissCalendarFunc: [],
calendarDivName1: 'calendarbox', // name of calendar <div> that gets toggled
calendarDivName2: 'calendarin', // name of <div> that contains calendar
calendarLinkName: 'calendarlink',// name of the link that is used to toggle
@ -41,7 +39,6 @@ var DateTimeShortcuts = {
addClock: function(inp) {
var num = DateTimeShortcuts.clockInputs.length;
DateTimeShortcuts.clockInputs[num] = inp;
DateTimeShortcuts.dismissClockFunc[num] = function() { DateTimeShortcuts.dismissClock(num); return true; };
// Shortcut links (clock icon and "Now" link)
var shortcuts_span = document.createElement('span');
@ -79,7 +76,7 @@ var DateTimeShortcuts = {
clock_box.className = 'clockbox module';
clock_box.setAttribute('id', DateTimeShortcuts.clockDivName + num);
document.body.appendChild(clock_box);
addEvent(clock_box, 'click', cancelEventPropagation);
addEvent(clock_box, 'click', DateTimeShortcuts.cancelEventPropagation);
quickElement('h2', clock_box, gettext('Choose a time'));
var time_list = quickElement('ul', clock_box, '');
@ -121,11 +118,11 @@ var DateTimeShortcuts = {
// Show the clock box
clock_box.style.display = 'block';
addEvent(document, 'click', DateTimeShortcuts.dismissClockFunc[num]);
addEvent(window.document, 'click', function() { DateTimeShortcuts.dismissClock(num); return true; });
},
dismissClock: function(num) {
document.getElementById(DateTimeShortcuts.clockDivName + num).style.display = 'none';
removeEvent(document, 'click', DateTimeShortcuts.dismissClockFunc[num]);
window.document.onclick = null;
},
handleClockQuicklink: function(num, val) {
DateTimeShortcuts.clockInputs[num].value = val;
@ -137,7 +134,6 @@ var DateTimeShortcuts = {
var num = DateTimeShortcuts.calendars.length;
DateTimeShortcuts.calendarInputs[num] = inp;
DateTimeShortcuts.dismissCalendarFunc[num] = function() { DateTimeShortcuts.dismissCalendar(num); return true; };
// Shortcut links (calendar icon and "Today" link)
var shortcuts_span = document.createElement('span');
@ -178,7 +174,7 @@ var DateTimeShortcuts = {
cal_box.className = 'calendarbox module';
cal_box.setAttribute('id', DateTimeShortcuts.calendarDivName1 + num);
document.body.appendChild(cal_box);
addEvent(cal_box, 'click', cancelEventPropagation);
addEvent(cal_box, 'click', DateTimeShortcuts.cancelEventPropagation);
// next-prev links
var cal_nav = quickElement('div', cal_box, '');
@ -245,11 +241,11 @@ var DateTimeShortcuts = {
cal_box.style.top = Math.max(0, findPosY(cal_link) - 75) + 'px';
cal_box.style.display = 'block';
addEvent(document, 'click', DateTimeShortcuts.dismissCalendarFunc[num]);
addEvent(window.document, 'click', function() { DateTimeShortcuts.dismissCalendar(num); return true; });
},
dismissCalendar: function(num) {
document.getElementById(DateTimeShortcuts.calendarDivName1+num).style.display = 'none';
removeEvent(document, 'click', DateTimeShortcuts.dismissCalendarFunc[num]);
window.document.onclick = null;
},
drawPrev: function(num) {
DateTimeShortcuts.calendars[num].drawPreviousMonth();
@ -281,6 +277,11 @@ var DateTimeShortcuts = {
DateTimeShortcuts.calendarInputs[num].value = d.strftime(get_format('DATE_INPUT_FORMATS')[0]);
DateTimeShortcuts.calendarInputs[num].focus();
DateTimeShortcuts.dismissCalendar(num);
},
cancelEventPropagation: function(e) {
if (!e) e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
}
}

View file

@ -32,9 +32,9 @@ function showRelatedObjectLookupPopup(triggeringLink) {
name = id_to_windowname(name);
var href;
if (triggeringLink.href.search(/\?/) >= 0) {
href = triggeringLink.href + '&_popup=1';
href = triggeringLink.href + '&pop=1';
} else {
href = triggeringLink.href + '?_popup=1';
href = triggeringLink.href + '?pop=1';
}
var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
win.focus();

View file

@ -1,8 +1,26 @@
/*
calendar.js - Calendar functions by Adrian Holovaty
depends on core.js for utility functions like removeChildren or quickElement
*/
function removeChildren(a) { // "a" is reference to an object
while (a.hasChildNodes()) a.removeChild(a.lastChild);
}
// quickElement(tagType, parentReference, textInChildNode, [, attribute, attributeValue ...]);
function quickElement() {
var obj = document.createElement(arguments[0]);
if (arguments[2] != '' && arguments[2] != null) {
var textNode = document.createTextNode(arguments[2]);
obj.appendChild(textNode);
}
var len = arguments.length;
for (var i = 3; i < len; i += 2) {
obj.setAttribute(arguments[i], arguments[i+1]);
}
arguments[1].appendChild(obj);
return obj;
}
// CalendarNamespace -- Provides a collection of HTML calendar-related helper functions
var CalendarNamespace = {
monthsOfYear: gettext('January February March April May June July August September October November December').split(' '),

View file

@ -10,15 +10,15 @@
}
});
// Add toggle to anchor tag
$("fieldset.collapse a.collapse-toggle").click(function(ev) {
if ($(this).closest("fieldset").hasClass("collapsed")) {
// Show
$("fieldset.collapse a.collapse-toggle").toggle(
function() { // Show
$(this).text(gettext("Hide")).closest("fieldset").removeClass("collapsed").trigger("show.fieldset", [$(this).attr("id")]);
} else {
// Hide
return false;
},
function() { // Hide
$(this).text(gettext("Show")).closest("fieldset").addClass("collapsed").trigger("hide.fieldset", [$(this).attr("id")]);
return false;
}
return false;
});
);
});
})(django.jQuery);

View file

@ -1,2 +1,2 @@
(function(a){a(document).ready(function(){a("fieldset.collapse").each(function(c,b){0==a(b).find("div.errors").length&&a(b).addClass("collapsed").find("h2").first().append(' (<a id="fieldsetcollapser'+c+'" class="collapse-toggle" href="#">'+gettext("Show")+"</a>)")});a("fieldset.collapse a.collapse-toggle").click(function(){a(this).closest("fieldset").hasClass("collapsed")?a(this).text(gettext("Hide")).closest("fieldset").removeClass("collapsed").trigger("show.fieldset",[a(this).attr("id")]):a(this).text(gettext("Show")).closest("fieldset").addClass("collapsed").trigger("hide.fieldset",
[a(this).attr("id")]);return!1})})})(django.jQuery);
(function(a){a(document).ready(function(){a("fieldset.collapse").each(function(c,b){a(b).find("div.errors").length==0&&a(b).addClass("collapsed").find("h2").first().append(' (<a id="fieldsetcollapser'+c+'" class="collapse-toggle" href="#">'+gettext("Show")+"</a>)")});a("fieldset.collapse a.collapse-toggle").toggle(function(){a(this).text(gettext("Hide")).closest("fieldset").removeClass("collapsed").trigger("show.fieldset",[a(this).attr("id")]);return false},function(){a(this).text(gettext("Show")).closest("fieldset").addClass("collapsed").trigger("hide.fieldset",
[a(this).attr("id")]);return false})})})(django.jQuery);

View file

@ -29,12 +29,6 @@ function removeEvent(obj, evType, fn) {
}
}
function cancelEventPropagation(e) {
if (!e) e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
}
// quickElement(tagType, parentReference, textInChildNode, [, attribute, attributeValue ...]);
function quickElement() {
var obj = document.createElement(arguments[0]);
@ -50,11 +44,6 @@ function quickElement() {
return obj;
}
// "a" is reference to an object
function removeChildren(a) {
while (a.hasChildNodes()) a.removeChild(a.lastChild);
}
// ----------------------------------------------------------------------------
// Cross-browser xmlhttp object
// from http://jibbering.com/2002/4/httprequest.html

View file

@ -22,8 +22,8 @@
var updateElementIndex = function(el, prefix, ndx) {
var id_regex = new RegExp("(" + prefix + "-(\\d+|__prefix__))");
var replacement = prefix + "-" + ndx;
if ($(el).prop("for")) {
$(el).prop("for", $(el).prop("for").replace(id_regex, replacement));
if ($(el).attr("for")) {
$(el).attr("for", $(el).attr("for").replace(id_regex, replacement));
}
if (el.id) {
el.id = el.id.replace(id_regex, replacement);
@ -32,9 +32,9 @@
el.name = el.name.replace(id_regex, replacement);
}
};
var totalForms = $("#id_" + options.prefix + "-TOTAL_FORMS").prop("autocomplete", "off");
var totalForms = $("#id_" + options.prefix + "-TOTAL_FORMS").attr("autocomplete", "off");
var nextIndex = parseInt(totalForms.val(), 10);
var maxForms = $("#id_" + options.prefix + "-MAX_NUM_FORMS").prop("autocomplete", "off");
var maxForms = $("#id_" + options.prefix + "-MAX_NUM_FORMS").attr("autocomplete", "off");
// only show the add button if we are allowed to add more items,
// note that max_num = None translates to a blank string.
var showAddButton = maxForms.val() === '' || (maxForms.val()-totalForms.val()) > 0;
@ -43,7 +43,7 @@
});
if ($this.length && showAddButton) {
var addButton;
if ($this.prop("tagName") == "TR") {
if ($this.attr("tagName") == "TR") {
// If forms are laid out as table rows, insert the
// "add" button in a new table row:
var numCols = this.eq(-1).children().length;

View file

@ -1,5 +1,5 @@
(function(b){b.fn.formset=function(d){var a=b.extend({},b.fn.formset.defaults,d),c=b(this),d=c.parent(),i=function(a,e,g){var d=RegExp("("+e+"-(\\d+|__prefix__))"),e=e+"-"+g;b(a).prop("for")&&b(a).prop("for",b(a).prop("for").replace(d,e));a.id&&(a.id=a.id.replace(d,e));a.name&&(a.name=a.name.replace(d,e))},f=b("#id_"+a.prefix+"-TOTAL_FORMS").prop("autocomplete","off"),g=parseInt(f.val(),10),e=b("#id_"+a.prefix+"-MAX_NUM_FORMS").prop("autocomplete","off"),f=""===e.val()||0<e.val()-f.val();c.each(function(){b(this).not("."+
a.emptyCssClass).addClass(a.formCssClass)});if(c.length&&f){var h;"TR"==c.prop("tagName")?(c=this.eq(-1).children().length,d.append('<tr class="'+a.addCssClass+'"><td colspan="'+c+'"><a href="javascript:void(0)">'+a.addText+"</a></tr>"),h=d.find("tr:last a")):(c.filter(":last").after('<div class="'+a.addCssClass+'"><a href="javascript:void(0)">'+a.addText+"</a></div>"),h=c.filter(":last").next().find("a"));h.click(function(d){d.preventDefault();var f=b("#id_"+a.prefix+"-TOTAL_FORMS"),d=b("#"+a.prefix+
(function(b){b.fn.formset=function(d){var a=b.extend({},b.fn.formset.defaults,d),c=b(this),d=c.parent(),i=function(a,e,g){var d=RegExp("("+e+"-(\\d+|__prefix__))"),e=e+"-"+g;b(a).attr("for")&&b(a).attr("for",b(a).attr("for").replace(d,e));a.id&&(a.id=a.id.replace(d,e));a.name&&(a.name=a.name.replace(d,e))},f=b("#id_"+a.prefix+"-TOTAL_FORMS").attr("autocomplete","off"),g=parseInt(f.val(),10),e=b("#id_"+a.prefix+"-MAX_NUM_FORMS").attr("autocomplete","off"),f=""===e.val()||0<e.val()-f.val();c.each(function(){b(this).not("."+
a.emptyCssClass).addClass(a.formCssClass)});if(c.length&&f){var h;"TR"==c.attr("tagName")?(c=this.eq(-1).children().length,d.append('<tr class="'+a.addCssClass+'"><td colspan="'+c+'"><a href="javascript:void(0)">'+a.addText+"</a></tr>"),h=d.find("tr:last a")):(c.filter(":last").after('<div class="'+a.addCssClass+'"><a href="javascript:void(0)">'+a.addText+"</a></div>"),h=c.filter(":last").next().find("a"));h.click(function(d){d.preventDefault();var f=b("#id_"+a.prefix+"-TOTAL_FORMS"),d=b("#"+a.prefix+
"-empty"),c=d.clone(true);c.removeClass(a.emptyCssClass).addClass(a.formCssClass).attr("id",a.prefix+"-"+g);c.is("tr")?c.children(":last").append('<div><a class="'+a.deleteCssClass+'" href="javascript:void(0)">'+a.deleteText+"</a></div>"):c.is("ul")||c.is("ol")?c.append('<li><a class="'+a.deleteCssClass+'" href="javascript:void(0)">'+a.deleteText+"</a></li>"):c.children(":first").append('<span><a class="'+a.deleteCssClass+'" href="javascript:void(0)">'+a.deleteText+"</a></span>");c.find("*").each(function(){i(this,
a.prefix,f.val())});c.insertBefore(b(d));b(f).val(parseInt(f.val(),10)+1);g=g+1;e.val()!==""&&e.val()-f.val()<=0&&h.parent().hide();c.find("a."+a.deleteCssClass).click(function(d){d.preventDefault();d=b(this).parents("."+a.formCssClass);d.remove();g=g-1;a.removed&&a.removed(d);d=b("."+a.formCssClass);b("#id_"+a.prefix+"-TOTAL_FORMS").val(d.length);(e.val()===""||e.val()-d.length>0)&&h.parent().show();for(var c=0,f=d.length;c<f;c++){i(b(d).get(c),a.prefix,c);b(d.get(c)).find("*").each(function(){i(this,
a.prefix,c)})}});a.added&&a.added(c)})}return this};b.fn.formset.defaults={prefix:"form",addText:"add another",deleteText:"remove",addCssClass:"add-row",deleteCssClass:"delete-row",emptyCssClass:"empty-row",formCssClass:"dynamic-form",added:null,removed:null};b.fn.tabularFormset=function(d){var a=b(this),c=function(){b(a.selector).not(".add-row").removeClass("row1 row2").filter(":even").addClass("row1").end().filter(":odd").addClass("row2")};a.formset({prefix:d.prefix,addText:d.addText,formCssClass:"dynamic-"+

View file

@ -3,5 +3,6 @@
* namespace (i.e. this preserves pre-existing values for both window.$ and
* window.jQuery).
*/
var django = django || {};
django.jQuery = jQuery.noConflict(true);
var django = {
"jQuery": jQuery.noConflict(true)
};

12801
admin/js/jquery.js vendored

File diff suppressed because it is too large Load diff

159
admin/js/jquery.min.js vendored

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 131 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 133 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 187 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 132 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 122 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 120 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

View file

@ -1,86 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' type='text/css' href='styles.css' />
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'></script>
</head>
<body>
<div id='cssmenu'>
<ul>
<li class='active'><a href='index.html'><span>Home</span></a></li>
<li class='has-sub'><a href='#'><span>Fossils</span></a>
<ul>
<li><a href='#'><span>Brachiopods</span></a></li>
<li class='last'><a href='#'><span>Trilobite</span></a></li>
</ul>
</li>
<li class='has-sub'><a href='#'><span>Minerals</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Bowen's Reaction Series</span></a>
<ul>
<li><a href='#'><span>Actinolite</span></a></li>
<li><a href='#'><span>Augite</span></a></li>
<li><a href='#'><span>Microcline</span></a></li>
<li><a href='#'><span>Muscovite</span></a></li>
<li><a href='#'><span>Olivine</span></a></li>
<li><a href='#'><span>Plagioclase</span></a></li>
<li class='last'><a href='#'><span>Quartz</span></a></li>
</ul>
</li>
<li class='last'><a href='#'><span>Calcite</span></a></li>
</ul>
</li>
<li class='has-sub'><a href='#'><span>Rocks</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Igneous</span></a>
<ul>
<li class='last'><a href='#'><span>Granite</span></a></li>
</ul>
</li>
<li class='has-sub'><a href='#'><span>Sedimentary</span></a>
<ul>
<li><a href='#'><span>Conglomerate</span></a></li>
<li class='last'><a href='#'><span>Ripped Sandstone</span></a></li>
</ul>
</li>
</ul>
</li>
<li class='last'><a href='#'><span>Deformed Schist</span></a></li>
</ul>
<h1 class="titleText">3D VOL</h1><!-- This is a placeholder for the 3DVOL logo !-->
</div><!-- END OF CSS MENU !-->
<div id="infoBox">
<p>Mineral details will populate this area</p>
</div><!-- END OF INFOBOX !-->
<div id="introBox">
<p>
Welcome to <span class="boldText">3DVOL - Minerals.</span><br/><br/>
This website contains a three-dimensional virtual object library of the most important rock-forming minerals making up planet Earth. You will find information on:<br/><br/>
Which are the most common minerals on Earth?<br/>
What are their most important physical and chemical properties?<br/>
Where in the Earth and under which physical conditions do they form? <br/>
How can they be identified in hand specimen?
</p>
<p>
A mineral is typically defined as an inorganic solid with a particular chemical composition and a characteristic, periodic atomic structure. This characteristic atomic make-up is often reflected in the macroscopic crystalline structure of a mineral. The 3D models presented on this website will help you to visualise, study, and memorise these beautiful and often complex crystal structures as well as other diagnostic features of minerals.
</p>
<p>
The website contains three sections. Section 1<!--Make this a link!--> gives you a bit of a theoretical introduction into where, how, and why minerals are formed in the Earth. Section 2<!--Make this a link!--> is a practice section that contains the 3D models of the featured minerals and information on their physical properties, diagnostic features, and geological significance. Section 3<!--Make this a link!--> provides a series of self-tests where you can check on your personal learning progress.
</p>
<p>
We hope that you enjoy using 3DVOL.<br/><br/>
- The 3DVOL team
</p>
</div><!-- END OF INTROBOX !-->
</body>
</html>

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more