Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: phpfreak/Project-Pier
base: d30ead694e
...
head fork: phpfreak/Project-Pier
compare: 4f61bff98a
  • 8 commits
  • 18 files changed
  • 0 commit comments
  • 1 contributor
14 application/controllers/UserController.class.php
View
@@ -124,6 +124,20 @@ function saveprojectnote(){
die;
}
+ /*
+ * save note about project
+ */
+ function saveprojectnoteview(){
+ if (isset($_POST['data']) && $_POST['data'] != ''){
+ $action = logged_user()->setProjectNoteView(active_project(), $_POST['data']);
+ $message = lang('saveprojectnoteview ok');
+ if (!$action) $message = lang('error during saveprojectnoteview');
+ die(make_json_for_ajax_return($action,$message));
+ }
+ die;
+ }
+
+
} // UserController
?>
20 application/layouts/inlinejs.php
View
@@ -27,14 +27,14 @@
} else {
$(children[i]).hide(speedhide);
}
- //break;
+ break;
}
}
}
-$(function() { $(".block").click(
+$(function() { $(".header").click(
function(e){
- expand_or_collapse(this,'content','fast','fast');
+ expand_or_collapse(this.parentNode,'content','fast','fast');
e.stopPropagation();
});
});
@@ -171,6 +171,18 @@ function stopRKey(evt) {
function audioPlayer(url) {
window.open(url, 'audio_player', 'width=200,height=240,scrollbars=no,toolbar=no,location=no,menubar=no');
-}
+}
+
+$(function() {
+ $( "#memo>.content" ).resizable({
+ handles: 'se',
+ alsoResize: '#memotext',
+ stop: function(event, ui) {
+ $( "#memo>.header" ).width(ui.size.width);
+ viewdata = '' + ui.size.width + ',' + ui.size.height;
+ post('<?php echo externalUrl(get_url('user','saveprojectnoteview', null, null, true, '&')); ?>', viewdata );
+ }
+ });
+});
//]]>
</script>
2  application/layouts/memo.php
View
@@ -2,7 +2,7 @@
$style='';
if (isset($_SESSION['memostate']) && $_SESSION['memostate'] == 'max') $style = 'style="display:block;"';
?>
-<div id="memo">
+<div id="memo" class="block">
<div class="header"><?php echo lang('memo')?></div>
<div class="content" <?php echo $style ?>><textarea id="memotext" onblur="post('<?php echo externalUrl(get_url('user','saveprojectnote'));?>', this.value);" rows="15" cols="20"><?php echo logged_user()->getProjectNote(active_project());?></textarea></div>
</div>
14 application/models/project_users/base/BaseProjectUser.class.php
View
@@ -76,7 +76,19 @@ function getNote() {
function setNote($value) {
return $this->setColumnValue('note', $value);
} // setNote()
-
+
+ /**
+ * Set value of 'noteview' field
+ *
+ * @access public
+ * @param string $value
+ * @return boolean
+ */
+ function setNoteView($value) {
+ //return $this->setColumnValue('noteview', $value);
+ } // setNoteView()
+
+
/**
* Return value of 'created_on' field
*
29 application/models/users/User.class.php
View
@@ -246,6 +246,33 @@ function getProjectNote(Project $project) {
return false;
} // getProjectNote
+
+ /**
+ * Set the project specific note for this user
+ *
+ * @param Project $project
+ * @param string $data
+ * @return boolean
+ */
+ function setProjectNoteView(Project $project, $data) {
+ if (is_null($project)) {
+ return false;
+ }
+ if (!$this->isProjectUser($project)) {
+ return false;
+ }
+ $project_user = ProjectUsers::findById(array(
+ 'project_id' => $project->getId(),
+ 'user_id' => $this->getId())
+ ); // findById
+ if ($project_user instanceof ProjectUser) {
+ $project_user->setNoteView($data);
+ return $project_user->save();
+ } // if
+ return false;
+ } // setProjectNote
+
+
/**
* Check if this of specific company website. If must be member of that company and is_admin flag set to true
@@ -682,7 +709,7 @@ function getImportantFiles($sort = 'name') {
* @return string
*/
function getDisplayName() {
- $display = parent::getDisplayName();
+ $display = $this->getContact()->getDisplayName();
return trim($display) == '' ? $this->getUsername() : $display;
} // getDisplayName
44 application/models/users/base/BaseUser.class.php
View
@@ -148,50 +148,6 @@ function setTwister($value) {
} // setTwister()
/**
- * Return value of 'display_name' field
- *
- * @access public
- * @param void
- * @return string
- */
- function getDisplayName() {
- return $this->getColumnValue('username');
- } // getDisplayName()
-
- /**
- * Set value of 'display_name' field
- *
- * @access public
- * @param string $value
- * @return boolean
- */
- function setDisplayName($value) {
- return true; // handled by contact now
- } // setDisplayName()
-
- /**
- * Return value of 'title' field
- *
- * @access public
- * @param void
- * @return string
- */
- function getTitle() {
- return $this->getColumnValue('title');
- } // getTitle()
-
- /**
- * Set value of 'title' field
- *
- * @access public
- * @param string $value
- * @return boolean
- */
- function setTitle($value) {
- return $this->setColumnValue('title', $value);
- } // setTitle()
-
- /**
* Return value of 'created_on' field
*
* @access public
13 application/plugins/i18n/controllers/I18nController.class.php
View
@@ -96,12 +96,13 @@ function edit_locale() {
$tag_names = '';
//$tag_names = plugin_active('tags') ? $locale->getTagNames() : '';
$locale_data = array(
- 'name' => $locale->getName(),
- 'description' => $locale->getDescription(),
- 'language_code' => $locale->getLanguageCode(),
- 'country_code' => $locale->getCountryCode(),
- 'editor_id' => $locale->getEditorId(),
- 'tags' => is_array($tag_names) ? implode(', ', $tag_names) : '',
+ 'name' => $locale->getName(),
+ 'description' => $locale->getDescription(),
+ 'language_code' => $locale->getLanguageCode(),
+ 'country_code' => $locale->getCountryCode(),
+ 'editor_id' => $locale->getEditorId(),
+ 'translation_url' => $locale->getTranslationUrl(),
+ 'tags' => is_array($tag_names) ? implode(', ', $tag_names) : '',
); // array
} // if
1  application/plugins/i18n/init.php
View
@@ -54,6 +54,7 @@ function i18n_activate() {
`country_code` varchar(50) $cs $co not null default '',
`logo_file` varchar( 50 ) $cs $co default '',
`editor_id` int(10) unsigned default NULL,
+ `translation_url` varchar( 255 ) $cs $co default '',
`created_on` datetime not null default '0000-00-00 00:00:00',
`created_by_id` int(10) unsigned default NULL,
`updated_on` datetime not null default '0000-00-00 00:00:00',
1  application/plugins/i18n/models/base/BaseI18nLocales.class.php
View
@@ -20,6 +20,7 @@
'country_code' => DATA_TYPE_STRING,
'logo_file' => DATA_TYPE_STRING,
'editor_id' => DATA_TYPE_INTEGER,
+ 'translation_url' => DATA_TYPE_STRING,
'created_on' => DATA_TYPE_DATETIME,
'created_by_id' => DATA_TYPE_INTEGER,
'updated_on' => DATA_TYPE_DATETIME,
5 application/plugins/i18n/views/edit_locale.php
View
@@ -36,6 +36,11 @@
</div>
<div>
+ <?php echo label_tag(lang('translation url'), 'localeFormTranslationUrl', true) ?>
+ <?php echo text_field('locale[translation_url]', array_var($locale_data, 'translation_url'), array('id' => 'localeFormTranslationUrl', 'class' => 'long')) ?>
+ </div>
+
+ <div>
<?php echo label_tag(lang('editor'), 'localeFormEditor', true) ?>
<?php echo select_user('locale[editor_id]', array_var($locale_data, 'editor_id'), array('id' => 'localeFormEditorId')) ?>
</div>
4 application/plugins/i18n/views/edit_values.php
View
@@ -12,6 +12,10 @@
?>
<?php if (isset($values) && is_array($values) && count($values)) { ?>
<form action=""><?php echo lang('search') ?>: <input type="text" id="filter"> <span id="filter-count"></span></form><br>
+<?php $trx_url = trim($locale->getTranslationUrl()); ?>
+<?php if ($trx_url) { ?>
+<iframe src="<?php echo $trx_url ?>" style="border: 1px solid black; width: 100%; height: 12em;"></iframe>
+<?php } ?>
<p><?php echo lang('click to edit') ?></p>
<table id="i18n_values" class="filtered">
<tr>
2  application/plugins/time/init.php
View
@@ -38,7 +38,7 @@ function times_my_tasks_dropdown() {
}
// administration dropdown
- add_action('administration_dropdown','times_administration_dropdown');
+ add_action('administration_company_dropdown','times_administration_dropdown');
function times_administration_dropdown() {
echo '<li class="header"><a href="'.get_url('administration', 'time').'">'.lang('time').'</a></li>';
}
8 application/views/application/user_box.php
View
@@ -73,12 +73,19 @@
<?php if(logged_user()->isAdministrator()) { ?>
<li><a href="<?php echo get_url('administration') ?>"><?php echo lang('administration') ?></a>
<ul>
+ <li><span><?php echo lang('company') ?></span></li>
<li class="header"><a href="<?php echo get_url('administration', 'company') ?>"><?php echo lang('company') ?></a></li>
<li><a href="<?php echo get_url('company', 'edit') ?>"><?php echo lang('edit company') ?></a></li>
<li><a href="<?php echo owner_company()->getAddContactUrl() ?>"><?php echo lang('add contact') ?></a></li>
<li class="header"><a href="<?php echo get_url('administration', 'clients') ?>"><?php echo lang('clients') ?></a></li>
<li><a href="<?php echo get_url('company', 'add_client') ?>"><?php echo lang('add client') ?></a></li>
<li class="header"><a href="<?php echo get_url('administration', 'projects') ?>"><?php echo lang('projects') ?></a></li>
+<?php
+ // PLUGIN HOOK
+ plugin_manager()->do_action('administration_company_dropdown');
+ // PLUGIN HOOK
+?>
+ <li><span><?php echo lang('installation') ?></span></li>
<li class="header"><a href="<?php echo get_url('administration', 'configuration') ?>"><?php echo lang('configuration') ?></a></li>
<li class="header"><a href="<?php echo get_url('administration', 'plugins') ?>"><?php echo lang('plugins') ?></a></li>
<li class="header"><a href="<?php echo get_url('administration', 'tools') ?>"><?php echo lang('administration tools') ?></a></li>
@@ -128,6 +135,7 @@
}
closedir($handle);
}
+asort($languages);
foreach( $languages as $locale => $desc ) {
echo '<li><a href="' . get_url('dashboard', 'index', array('language' => $locale) ) . '" >' . $desc . '</a></li>';
}
7 environment/classes/authentication/HTTPBasicAuthenticator.class.php
View
@@ -42,8 +42,8 @@ function authenticate($login_data) {
$_SERVER['PHP_AUTH_PW'] = strip_tags($password);
}
- if($_SESSION['authenticated'] != 1) {
- if($_SESSION['login'] != 1) {
+ if(isset($_SESSION['authenticated']) && $_SESSION['authenticated'] != 1) {
+ if(isset($_SESSION['login']) && $_SESSION['login'] != 1) {
$_SESSION['login'] = 1;
$_SESSION['try_count'] = 0;
$_SESSION['realm'] = time();
@@ -55,6 +55,9 @@ function authenticate($login_data) {
}
}
+ if (!isset($_SESSION['try_count'])) $_SESSION['try_count'] = 0;
+ if (!isset($_SESSION['realm'])) $_SESSION['realm'] = time();
+
$_SESSION['authenticated'] = 0;
$_SESSION['try_count']++;
if ($_SESSION['try_count']==4) {
37 public/assets/themes/marine/stylesheets/general/construction.css
View
@@ -373,8 +373,8 @@ only IE mac will see this*/
}
#crumbsBlock {
- font-size: 13px;
- line-height: 28px;
+ font-size: 0.9em;
+ line-height: 2em;
margin: 0 auto;
padding: 0 10px;
text-align: left;
@@ -398,9 +398,7 @@ only IE mac will see this*/
#crumbs ul li {
color: #FFFFFF;
display: inline;
- font-size: 13px;
font-weight: bold;
- line-height: 22px;
border-right: 1px solid #8DBBCE;
padding: 0 5px;
}
@@ -781,23 +779,18 @@ div .block { margin-left: 0px; }
#links { padding: 0; }
#links .odd { background-color: transparent; }
-#oldmemo{position:fixed;bottom:0px;right:0px;background-color:#FAF9E4;height:150px;width:150px;font-weight: bold;font-size:14px;border:1px solid black;padding:2px;z-index: 9998;filter:alpha(opacity=80);-moz-opacity:0.8;opacity: 0.8;-moz-border-radius:5px;border-radius: 5px;}
-#oldmemo .header{text-align:center;background-color:#FAF9E4; color: black}
-#oldmemo textarea{width:140px;height:110px;margin:0px;background:transparent;border:none;color:black}
-#memo .content { margin-left: 0px; }
-
#memo {
position:fixed;
- bottom:-230px;
- right:10px;
+ right:0px;
+ bottom:0px;
background-color:#FAF9E4;
- height:250px;
- width:250px;
+ height:auto;
+ width:auto;
font-weight: bold;
- font-size:14px;
+ font-size:0.9em;
border:1px solid black;
- padding:2px;
+ padding:0px 4px;
z-index: 9998;
filter:alpha(opacity=90);
-moz-opacity:0.9;
@@ -808,15 +801,7 @@ div .block { margin-left: 0px; }
-moz-transition: 0.2s;
transition: 0.2s;
}
-#memo:hover { bottom:0; }
-#memo .header{
- line-height:18px;
- text-align:center;
- background-color:#FAF9E4;
- color: black;
- background:url(../../images/icons/edit.gif) top right no-repeat;
- margin-right:2px;
- margin-top:2px;
+#memo .content { margin: 0px; }
+#memotext {
+ resize:none;margin:0px;background:transparent;border:none;color:black
}
-#memo:hover .header { background-image:none; }
-#memo textarea{width:240px;height:210px;margin:0px;background:transparent;border:none;color:black}
0  public/assets/themes/marine/stylesheets/radio.css
View
No changes.
1  public/patch/xxxx-i18n-url.sql
View
@@ -0,0 +1 @@
+ALTER TABLE `<?php echo $table_prefix ?>i18n_locales` ADD `translation_url` varchar( 255 ) <?php echo $default_charset ?> <?php echo $default_collation ?> default '' AFTER editor_id;
2  upgrade.txt
View
@@ -7,7 +7,7 @@ ProjectPier 0.8.8 is NOT database compatible with previous versions.
Upgrade instructions
- 1) Enable all plugins (you will want to note down which plugins were not using to disable them later).
+ 1) Enable all plugins (you will want to note down which plugins you were not using to disable them later).
2) Unzip the ProjectPier v0.8.8 package to your hard drive. Be sure you are able to locate the pp088 folder you just unzipped.
3) Make a backup of your 0.8.6 database before you begin making any changes.
4) Append 086 to the 0.8.6 core folders mentioned in appendix A. This will make sure we can restore if necessary.

No commit comments for this range

Something went wrong with that request. Please try again.