Ejegg has submitted this change and it was merged. Change subject: Add a cat playing a trombone ......................................................................
Add a cat playing a trombone Change-Id: I91f62e5ee0d3e2a4e6076c85cf95e624d85fe730 --- M persistence.sql M src/app/startup.js A src/components/widgets/cat-trombone/cat-trombone.html A src/components/widgets/cat-trombone/cat-trombone.js A src/images/catmusician.gif 5 files changed, 46 insertions(+), 0 deletions(-) Approvals: Ejegg: Looks good to me, approved diff --git a/persistence.sql b/persistence.sql index d676b56..744b20f 100644 --- a/persistence.sql +++ b/persistence.sql @@ -63,6 +63,7 @@ INSERT IGNORE INTO dash_widget ( code, display_name, description, preview_path ) VALUES ( 'amt-per-second-chart', 'Amount Per Second', 'Shows USD per second required to reach Big English goal', 'images/amt-per-sec.png'); INSERT IGNORE INTO dash_widget ( code, display_name, description, preview_path ) VALUES ( 'distance-to-goal-chart', 'Distance to Goal', 'Line chart showing USD needed to reach overall Big English goal', 'images/distance-to-goal.png'); INSERT IGNORE INTO dash_widget ( code, display_name, description, preview_path ) VALUES ( 'totals-earned-chart', 'Totals Earned', 'Main Big English bar chart showing daily and hourly donation totals and counts', 'images/totals-earned.png'); +INSERT IGNORE INTO dash_widget ( code, display_name, description, preview_path ) VALUES ( 'cat-trombone', 'Trombone Cat', 'A cat is playing a TROMBONE', 'images/catmusician.gif'); /* Tailor these to your liking GRANT INSERT, SELECT, UPDATE, DELETE ON dash_widget_instance_board TO 'testuser'@'localhost'; diff --git a/src/app/startup.js b/src/app/startup.js index e6cc743..65f0d20 100644 --- a/src/app/startup.js +++ b/src/app/startup.js @@ -25,6 +25,7 @@ ko.components.register( 'distance-to-goal-chart', { require: 'components/widgets/distance-to-goal-chart/distance-to-goal-chart' }); ko.components.register( 'amt-per-second-chart', { require: 'components/widgets/amt-per-second-chart/amt-per-second-chart' }); ko.components.register( 'x-by-y', { require: 'components/widgets/x-by-y/x-by-y' }); + ko.components.register( 'cat-trombone', { require: 'components/widgets/cat-trombone/cat-trombone' }); //fire up router ko.applyBindings({ route: router.currentRoute }); diff --git a/src/components/widgets/cat-trombone/cat-trombone.html b/src/components/widgets/cat-trombone/cat-trombone.html new file mode 100644 index 0000000..fffac86 --- /dev/null +++ b/src/components/widgets/cat-trombone/cat-trombone.html @@ -0,0 +1,31 @@ + +<div class="panel panel-purple widget-6"> + <div class="panel-heading"> + <p class="pull-left">This cat is playing a trombone</p> + <div class="btn-group btn-group-xs pull-right"> + <button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="modal" data-bind="attr: { 'data-target': '#remove'+instanceID }"><i class="fa fa-times"></i></button> + </div> + </div> + <div class="panel-body"> + <div class="row-fluid"> + <div class="col-md-12"> + <p class="text-center"><img src="/images/catmusician.gif"></p> + </div> + </div> + </div> +</div> + + +<div class="modal fade" data-bind="attr: { id: 'remove'+instanceID } "> + <div class="modal-dialog modal-sm"> + <div class="modal-content"> + <div class="modal-header"> + <h2>Remove this widget from the board?</h2> + </div> + <div class="modal-body"> + <button class="btn btn-lg btn-success pull-right" data-dismiss="modal" data-bind="click: $parents[2].removeWidgetFromBoard"> OK</button> + <button class="btn btn-lg btn-danger pull-right" data-dismiss="modal"> Cancel</button> + </div> + </div><!-- /.modal-content --> + </div> +</div> \ No newline at end of file diff --git a/src/components/widgets/cat-trombone/cat-trombone.js b/src/components/widgets/cat-trombone/cat-trombone.js new file mode 100644 index 0000000..3a1bf88 --- /dev/null +++ b/src/components/widgets/cat-trombone/cat-trombone.js @@ -0,0 +1,13 @@ +define( [ + 'knockout', + 'text!components/widgets/cat-trombone/cat-trombone.html', + 'WidgetBase' +], function( ko, template, WidgetBase ){ + + function CatTromboneViewModel( params ){ + + WidgetBase.call( this, params ); + + } + return { viewModel: CatTromboneViewModel, template: template }; +}); diff --git a/src/images/catmusician.gif b/src/images/catmusician.gif new file mode 100644 index 0000000..012e511 --- /dev/null +++ b/src/images/catmusician.gif Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/199530 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I91f62e5ee0d3e2a4e6076c85cf95e624d85fe730 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/dash Gerrit-Branch: master Gerrit-Owner: Ssmith <ssm...@wikimedia.org> Gerrit-Reviewer: Ejegg <eeggles...@wikimedia.org> Gerrit-Reviewer: Springle <sprin...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits