diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-11-09 14:56:53 -0800 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-11-09 14:56:53 -0800 |
commit | cda8fb338068ff8d5393580ee0cb15f8b080fb6f (patch) | |
tree | eaf686fab3c1ae66d954b1eda271c13732aa9cf3 /doc/schemaspy_hubzilla/schemaSpy.js | |
parent | 862a31007543c292ba3bcd6d56e390d83c1043be (diff) | |
parent | 98146eae076a7eff315c4927ad1fc2ee2a06ade8 (diff) | |
download | volse-hubzilla-cda8fb338068ff8d5393580ee0cb15f8b080fb6f.tar.gz volse-hubzilla-cda8fb338068ff8d5393580ee0cb15f8b080fb6f.tar.bz2 volse-hubzilla-cda8fb338068ff8d5393580ee0cb15f8b080fb6f.zip |
Merge https://github.com/redmatrix/hubzilla into pending_merge
Diffstat (limited to 'doc/schemaspy_hubzilla/schemaSpy.js')
-rw-r--r-- | doc/schemaspy_hubzilla/schemaSpy.js | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/doc/schemaspy_hubzilla/schemaSpy.js b/doc/schemaspy_hubzilla/schemaSpy.js deleted file mode 100644 index d1a739d4e..000000000 --- a/doc/schemaspy_hubzilla/schemaSpy.js +++ /dev/null @@ -1,97 +0,0 @@ -// table-based pages are expected to set 'table' to their name
-var table = null;
-
-// sync target's visibility with the state of checkbox
-function sync(cb, target) {
- var checked = cb.attr('checked');
- var displayed = target.css('display') != 'none';
- if (checked != displayed) {
- if (checked)
- target.show();
- else
- target.hide();
- }
-}
-
-// sync target's visibility with the inverse of the state of checkbox
-function unsync(cb, target) {
- var checked = cb.attr('checked');
- var displayed = target.css('display') != 'none';
- if (checked == displayed) {
- if (checked)
- target.hide();
- else
- target.show();
- }
-}
-
-// associate the state of checkbox with the visibility of target
-function associate(cb, target) {
- sync(cb, target);
- cb.click(function() {
- sync(cb, target);
- });
-}
-
-// select the appropriate image based on the options selected
-function syncImage() {
- var implied = $('#implied').attr('checked');
-
- $('.diagram').hide();
-
- if (table) {
- if (implied && $('#impliedTwoDegreesImg').size() > 0) {
- $('#impliedTwoDegreesImg').show();
- } else {
- var oneDegree = $('#oneDegree').attr('checked');
-
- if (oneDegree || $('#twoDegreesImg').size() == 0) {
- $('#oneDegreeImg').show();
- } else {
- $('#twoDegreesImg').show();
- }
- }
- } else {
- var showNonKeys = $('#showNonKeys').attr('checked');
-
- if (implied) {
- if (showNonKeys && $('#impliedLargeImg').size() > 0) {
- $('#impliedLargeImg').show();
- } else if ($('#impliedCompactImg').size() > 0) {
- $('#impliedCompactImg').show();
- } else {
- $('#realCompactImg').show();
- }
- } else {
- if (showNonKeys && $('#realLargeImg').size() > 0) {
- $('#realLargeImg').show();
- } else {
- $('#realCompactImg').show();
- }
- }
- }
-}
-
-// our 'ready' handler makes the page consistent
-$(function(){
- associate($('#implied'), $('.impliedRelationship'));
- associate($('#showComments'), $('.comment'));
- associate($('#showLegend'), $('.legend'));
- associate($('#showRelatedCols'), $('.relatedKey'));
- associate($('#showConstNames'), $('.constraint'));
-
- syncImage();
- $('#implied,#oneDegree,#twoDegrees,#showNonKeys').click(function() {
- syncImage();
- });
-
- unsync($('#implied'), $('.degrees'));
- $('#implied').click(function() {
- unsync($('#implied'), $('.degrees'));
- });
-
- unsync($('#removeImpliedOrphans'), $('.impliedNotOrphan'));
- $('#removeImpliedOrphans').click(function() {
- unsync($('#removeImpliedOrphans'), $('.impliedNotOrphan'));
- });
-});
|