2 /*******************************************************************************
3 * Copyright (c) 2012-2013 University of Stuttgart.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and the Apache License 2.0 which both accompany this distribution,
7 * and are available at http://www.eclipse.org/legal/epl-v10.html
8 * and http://www.apache.org/licenses/LICENSE-2.0
11 * Oliver Kopp - initial API and implementation and/or initial documentation
12 *******************************************************************************/
14 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
16 <div class="form-group">
17 <label class="control-label" for="abstract">Abstract</label>
18 <select class="form-control" style="width:100px;" id="isAbstract" onchange="updateValue('abstract', this.options[this.selectedIndex].value);">
19 <option value="yes"<c:if test="${it.isAbstract=='yes'}"> selected="selected"</c:if>>yes</option>
20 <option value="no"<c:if test="${it.isAbstract=='no'}"> selected="selected"</c:if>>no</option>
24 <div class="form-group">
25 <label class="control-label">Final</label>
26 <select class="form-control" style="width:100px;" id="isFinal" onchange="updateValue('final', this.options[this.selectedIndex].value);">
27 <option value="yes"<c:if test="${it.isFinal=='yes'}"> selected="selected"</c:if>>yes</option>
28 <option value="no"<c:if test="${it.isFinal=='no'}"> selected="selected"</c:if>>no</option>
32 <div class="form-group">
33 <label class="control-label">Derived from</label>
34 <div style="display: block; width: 100%">
35 <select class="form-control" style="width:600px; display:inline; margin-right: 10px;" id="derivedFrom" onchange="updateValue('derivedFrom', this.options[this.selectedIndex].value);">
36 <option value=""<c:if test="${empty it.derivedFrom}"> selected="selected"</c:if>>(none)</option>
37 <c:forEach items="${it.possibleSuperTypes}" var="type">
38 <c:set var="value" value="${type.QName}" />
39 <option value="${value}"<c:if test="${value==it.derivedFrom}"> selected="selected"</c:if>>${type.xmlId.decoded}</option>
42 <button type="button" class="btn btn-info btn-sm" onclick="openSuperType();">Open</button>
47 function openSuperType() {
48 require(["winery-support-common"], function(w) {
49 var qname = $("#derivedFrom").val();
50 var fragment = w.getURLFragmentOutOfFullQName(qname);
51 var url = "../../" + fragment + "/";
52 window.location = url;