src_js/iconolab-bundle/src/components/collectionselector/CollectionSelector.vue
author durandn
Thu, 06 Oct 2016 15:07:50 +0200
changeset 212 1c7cce196665
child 263 ab794183f134
permissions -rw-r--r--
Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
212
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     1
<script>
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     2
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     3
export default {
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     4
	data () {
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     5
		return {}
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     6
	},
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     7
	mounted () {
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     8
		var self=this;
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
     9
		$(".collection-container").hide();
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    10
		$(".collection-description-complete").hide();
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    11
	},
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    12
	methods: {
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    13
	 	pickCollection: function(name){
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    14
		    if (!$("#show-collection-"+name).hasClass("btn-primary")){
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    15
			    $("#main-panel").hide();
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    16
	     	    $(".collection-container").removeClass("selected");
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    17
	     	    $(".collection-container:not(.selected)").hide();
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    18
			    $(".collection-description-complete").hide()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    19
			    $(".collection-description").show()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    20
	     	    $(".btn-collection").removeClass("btn-primary")
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    21
	     	    $("#show-collection-"+name).addClass("btn-primary")
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    22
	     	    $(".collection-container#collection-panel-"+name).show()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    23
	     	    $(".collection-container#collection-panel-"+name).addClass("selected")
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    24
		    }
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    25
		},
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    26
		showCompleteDescription: function(name){
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    27
		    $(".collection-description-complete").hide()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    28
		    $("#collection-description-short-"+name).hide()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    29
		    $("#collection-description-complete-"+name).show()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    30
		},
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    31
		hideCompleteDescription: function(name){
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    32
		    $(".collection-description-complete").hide()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    33
		    $("#collection-description-short-"+name).show()
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    34
		}
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    35
	}
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    36
}
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    37
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    38
1c7cce196665 Added complete_description attribute to Collection for homepage #12 + Vue.js components to handle display and sart to harmonize javascript
durandn
parents:
diff changeset
    39
</script>