-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2710 from DenverCoder544/publisher_tools_reactifi…
…cation_zoombar Publisher tools reactification zoombar
- Loading branch information
Showing
16 changed files
with
82 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
55 changes: 55 additions & 0 deletions
55
bundles/mapping/mapmodule/plugin/zoombar/publisher/ZoombarTool.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { AbstractPublisherTool } from '../../../../../framework/publisher2/tools/AbstractPublisherTool'; | ||
|
||
class ZoombarTool extends AbstractPublisherTool { | ||
constructor (...args) { | ||
super(...args); | ||
this.index = 1; | ||
this.group = 'additional'; | ||
}; | ||
|
||
/** | ||
* Get tool object. | ||
* @method getTool | ||
* | ||
* @returns {Object} tool description | ||
*/ | ||
getTool () { | ||
return { | ||
id: 'Oskari.mapframework.bundle.mapmodule.plugin.Portti2Zoombar', | ||
title: Oskari.getMsg('MapModule', 'publisherTools.Zoombar.toolLabel'), | ||
config: this.state.pluginConfig || {} | ||
}; | ||
}; | ||
|
||
/** | ||
* Get values. | ||
* @method getValues | ||
* @public | ||
* | ||
* @returns {Object} tool value object | ||
*/ | ||
getValues () { | ||
if (!this.isEnabled()) { | ||
return null; | ||
} | ||
return { | ||
configuration: { | ||
mapfull: { | ||
conf: { | ||
plugins: [{ id: this.getTool().id, config: this.getPlugin().getConfig() }] | ||
} | ||
} | ||
} | ||
}; | ||
}; | ||
} | ||
|
||
// Attach protocol to make this discoverable by Oskari publisher | ||
Oskari.clazz.defineES('Oskari.publisher.ZoombarTool', | ||
ZoombarTool, | ||
{ | ||
protocol: ['Oskari.mapframework.publisher.Tool'] | ||
} | ||
); | ||
|
||
export { ZoombarTool }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters