partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit b1aff5c795073d0bc58d47b088d02ef51be22e0c
parent b9a68f229fb8b7790e517b53238d12d1b2341745
Author: Felicitus <felicitus@felicitus.org>
Date:   Fri, 17 Jun 2011 01:38:53 +0200

Merge branch 'TIMO'

Diffstat:
Mfrontend/js/Components/Footprint/FootprintEditor.js | 2+-
Mfrontend/js/Components/Part/PartFilterPanel.js | 4++--
Mfrontend/js/Components/Widgets/AttachmentGrid.js | 3+--
Mfrontend/js/Dialogs/FileUploadDialog.js | 2+-
Apre-commit.hook | 20++++++++++++++++++++
5 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/frontend/js/Components/Footprint/FootprintEditor.js b/frontend/js/Components/Footprint/FootprintEditor.js @@ -32,5 +32,5 @@ Ext.define('PartKeepr.FootprintEditor', { this.callParent(); this.attachmentGrid.getStore().sync(); - }, + } }); \ No newline at end of file diff --git a/frontend/js/Components/Part/PartFilterPanel.js b/frontend/js/Components/Part/PartFilterPanel.js @@ -14,7 +14,7 @@ Ext.define('PartKeepr.PartFilterPanel', { xtype: 'container', anchor: '100%', layout: 'anchor', - columnWidth: .5, + columnWidth: 0.5, items: [ this.storageLocationFilter, this.categoryFilter, @@ -26,7 +26,7 @@ Ext.define('PartKeepr.PartFilterPanel', { this.rightColumn = { xtype: 'container', anchor: '100%', - columnWidth: .5, + columnWidth: 0.5, layout: 'anchor', items: [ this.stockFilter diff --git a/frontend/js/Components/Widgets/AttachmentGrid.js b/frontend/js/Components/Widgets/AttachmentGrid.js @@ -130,12 +130,11 @@ Ext.define('PartKeepr.AttachmentGrid', { viewAttachment: function (record) { var mySrc = "file.php?type="+this.model+"&"; - if (record.get("id") == 0) { + if (record.get("id") === 0) { mySrc += "id=0&tmpId=" + record.get("tmp_id"); } else { mySrc += "id=" + record.get("id"); } - console.log(mySrc); new Ext.Window({ title : i18n("Display File"), diff --git a/frontend/js/Dialogs/FileUploadDialog.js b/frontend/js/Dialogs/FileUploadDialog.js @@ -22,7 +22,7 @@ Ext.define('PartKeepr.FileUploadDialog', { var values = form.getValues(); - if (this.fileField.getValue() == "" && this.urlField.getValue() == "") { + if (this.fileField.getValue() === "" && this.urlField.getValue() === "") { Ext.Msg.alert(i18n("Error"), i18n("Please select a file to upload or enter an URL")); return; } diff --git a/pre-commit.hook b/pre-commit.hook @@ -0,0 +1,20 @@ +#!/bin/sh +# +# PartKeepr pre-commit hook. +# Checks if everything looks well before comitting + +RESULT=`phing pre-commit` + +RETVAL=$? + +if [ $RETVAL -ne 0 ]; then + echo "phing pre-commit finished with errors. Please check the output of 'phing pre-commit' manually." + exit 254 +fi; + +NUM=`echo $RESULT | grep -i "warning" | wc -l` + +if [ $NUM -ne 0 ]; then + echo "phing pre-commit finished with warnings. Please check the output manually." + exit 254 +fi;