Skip to content

Commit

Permalink
add rendering menu and VerovioView
Browse files Browse the repository at this point in the history
  • Loading branch information
elena1113 committed Jul 30, 2015
1 parent b1b0715 commit b0afef0
Show file tree
Hide file tree
Showing 11 changed files with 9,966 additions and 3 deletions.
1 change: 1 addition & 0 deletions add/data/locale/edirom-lang-de.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<entry key="controller.window.Window_renderingView" value="Rendering"/>
<entry key="controller.window.Window_searchView" value="Suche"/>
<entry key="controller.window.Window_sourceView" value="Faksimile"/>
<entry key="controller.window.Window_verovioView" value="Rendering"/>
<entry key="controller.window.Window_summaryView" value="Zusammenfassung"/>
<entry key="controller.window.Window_textFacsimileSplitView" value="Text-Faksimile"/>
<entry key="controller.window.Window_textView" value="Text"/>
Expand Down
1 change: 1 addition & 0 deletions add/data/locale/edirom-lang-en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<entry key="controller.window.Window_renderingView" value="Rendering"/>
<entry key="controller.window.Window_searchView" value="Search window"/>
<entry key="controller.window.Window_sourceView" value="Facsimile"/>
<entry key="controller.window.Window_verovioView" value="Rendering"/>
<entry key="controller.window.Window_summaryView" value="Summary"/>
<entry key="controller.window.Window_textFacsimileSplitView" value="Text-Facsimile"/>
<entry key="controller.window.Window_textView" value="Text"/>
Expand Down
3 changes: 3 additions & 0 deletions add/data/xql/getLinkTarget.xql
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ declare function local:getViews($type, $docUri, $doc) {
(: SourceView :)
if($doc//mei:facsimile//mei:graphic[@type='facsimile']) then(concat("{type:'sourceView',uri:'", $docUri, "'}")) else(),

(: VerovioView :)
if($doc//mei:facsimile//mei:graphic[@type='facsimile']) then(concat("{type:'verovioView',uri:'", $docUri, "'}")) else(),

(: TextView :)
if($doc//tei:body[matches(.//text(), '[^\s]+')]) then(concat("{type:'textView',uri:'", $docUri, "'}")) else(),

Expand Down
4 changes: 2 additions & 2 deletions add/data/xql/getSummary.xql
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import module namespace eutil="http://www.edirom.de/xquery/util" at "../xqm/util
declare namespace request="http://exist-db.org/xquery/request";
declare namespace mei="http://www.music-encoding.org/ns/mei";
declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace image="http://www.edirom.de/ns/image";
declare namespace edirom_image="http://www.edirom.de/ns/image";
declare namespace xmldb="http://exist-db.org/xquery/xmldb";

declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
Expand Down Expand Up @@ -174,7 +174,7 @@ declare function local:getSourceSummary($doc, $facsBasePath) {
declare function local:getImagePath($basePath, $uri, $width) {
if(starts-with($uri, 'xmldb:exist'))
then(
let $imagePath := doc($uri)/image:image/@file
let $imagePath := doc($uri)/edirom_image:image/@file
return
concat($basePath, $imagePath, '?dw=', $width, '&amp;amp;mo=fit')
)
Expand Down
1 change: 1 addition & 0 deletions app/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Ext.define('EdiromOnline.Application', {
'window.source.SourceView',
'window.source.PageBasedView',
'window.source.MeasureBasedView',
'window.source.VerovioView',
'window.text.TextFacsimileSplitView',
'window.text.TextView'
],
Expand Down
4 changes: 3 additions & 1 deletion app/controller/window/SingleWindowController.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Ext.define('EdiromOnline.controller.window.SingleWindowController', {

var me = this;
var views = [];

Ext.Array.each(config.views, function(view) {

views.push(this.createView(view.type, {
Expand Down Expand Up @@ -106,6 +106,7 @@ Ext.define('EdiromOnline.controller.window.SingleWindowController', {
case 'summaryView': return getLangString('controller.window.Window_summaryView');
case 'xmlView': return getLangString('controller.window.Window_xmlView');
case 'sourceView': return getLangString('controller.window.Window_sourceView');
case 'verovioView': return getLangString('controller.window.Window_verovioView');
case 'headerView': return getLangString('controller.window.Window_headerView');
case 'facsimileView': return 'Faksimile';
case 'textView': return getLangString('controller.window.Window_textView');
Expand All @@ -121,6 +122,7 @@ Ext.define('EdiromOnline.controller.window.SingleWindowController', {
case 'summaryView': return 'EdiromOnline.view.window.SummaryView';
case 'xmlView': return 'EdiromOnline.view.window.XmlView';
case 'sourceView': return 'EdiromOnline.view.window.source.SourceView';
case 'verovioView': return 'EdiromOnline.view.window.source.VerovioView';
case 'headerView': return 'EdiromOnline.view.window.HeaderView';
case 'textView': return 'EdiromOnline.view.window.text.TextView';
case 'facsimileView': return 'EdiromOnline.view.window.text.FacsimileView';
Expand Down
79 changes: 79 additions & 0 deletions app/controller/window/source/VerovioView.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/**
* Edirom Online
* Copyright (C) 2014 The Edirom Project
* http://www.edirom.de
*
* Edirom Online is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Edirom Online is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Edirom Online. If not, see <http://www.gnu.org/licenses/>.
*/
Ext.define('EdiromOnline.controller.window.source.VerovioView', {

extend: 'Ext.app.Controller',

views: [
'window.source.VerovioView'
],

init: function() {
this.control({
'verovioView': {
// afterlayout: this.onSourceViewRendered,
// beforedestroy: this.onSourceViewDestroyed,
single: true
}
});
}

/* onSourceViewRendered: function(view) {
var me = this;
if(view.initialized) return;
view.initialized = true;
view.on('measureVisibilityChange', me.onMeasureVisibilityChange, me);
view.on('annotationsVisibilityChange', me.onAnnotationsVisibilityChange, me);
view.on('overlayVisiblityChange', me.onOverlayVisibilityChange, me);
view.on('gotoMovement', me.onGotoMovement, me);
view.on('gotoMeasureByName', me.onGotoMeasureByName, me);
view.on('gotoMeasure', me.onGotoMeasure, me);
view.on('gotoZone', me.onGotoZone, me);
ToolsController.addMeasureVisibilityListener(view.id, Ext.bind(view.checkGlobalMeasureVisibility, view));
view.checkGlobalMeasureVisibility(ToolsController.areMeasuresVisible());
ToolsController.addAnnotationVisibilityListener(view.id, Ext.bind(view.checkGlobalAnnotationVisibility, view));
view.checkGlobalAnnotationVisibility(ToolsController.areAnnotationsVisible());
Ext.Ajax.request({
url: 'data/xql/getMovements.xql',
method: 'GET',
params: {
uri: view.uri
},
success: function(response){
var data = response.responseText;
var movements = Ext.create('Ext.data.Store', {
fields: ['id', 'name'],
data: Ext.JSON.decode(data)
});
me.movementsLoaded(movements, view);
}
});
}*/


});
Loading

0 comments on commit b0afef0

Please sign in to comment.