committing the new dash design, along with delete button functionality. edit button functionality to come.
This commit is contained in:
parent
fdfb9bf5ae
commit
48d69dfd28
28 changed files with 379 additions and 187 deletions
|
|
@ -216,8 +216,8 @@ sub view {
|
|||
}
|
||||
}
|
||||
$vars{showAdmin} = ($session{var}{adminOn} && $self->canEdit);
|
||||
WebGUI::Style::setScript($session{config}{extrasURL}."/wobject/Dashboard/draggable.js",{ type=>"text/javascript" });
|
||||
WebGUI::Style::setLink($session{config}{extrasURL}."/wobject/Dashboard/draggable.css",{ type=>"text/css", rel=>"stylesheet", media=>"all" });
|
||||
# WebGUI::Style::setScript($session{config}{extrasURL}."/wobject/Dashboard/draggable.js",{ type=>"text/javascript" });
|
||||
# WebGUI::Style::setLink($session{config}{extrasURL}."/wobject/Dashboard/draggable.css",{ type=>"text/css", rel=>"stylesheet", media=>"all" });
|
||||
$vars{"dragger.init"} = '
|
||||
<script type="text/javascript">
|
||||
dragable_init("'.$self->getUrl.'");
|
||||
|
|
|
|||
|
|
@ -98,16 +98,14 @@ sub _getLocationData {
|
|||
$document =~ m!<hr>\s<div\salign="center">\s(.*?)<br>.*?<br>.*?<br>.*?<br>\s(.*?):\s(.*?) °F<br>!;
|
||||
$locData = {
|
||||
query => $location,
|
||||
cityState => $1,
|
||||
sky => $2,
|
||||
tempF => $3,
|
||||
cityState => $1 || $location,
|
||||
sky => $2 || 'N/A',
|
||||
tempF => $3 || 'N/A',
|
||||
iconUrl => $session{config}{extrasURL}.'/wobject/WeatherData/'.$self->_chooseWeatherConditionsIcon($2).'.jpg'
|
||||
};
|
||||
$cache->set($locData, 60*60) if $locData->{cityState};
|
||||
$cache->set($locData, 60*60) if $locData->{sky} ne 'NULL';
|
||||
}
|
||||
return $locData;
|
||||
|
||||
# return $cityState.'<br />'.$sky.'<br />'.$ftemp.'°F<br /><img src="'.$iconUrl.'" />';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -121,6 +119,7 @@ largely from http://www.weather.gov/data/current_obs/weather.php
|
|||
sub _chooseWeatherConditionsIcon {
|
||||
my $self = shift;
|
||||
my $currCond = shift;
|
||||
if (isIn($currCond,'','N/A','NULL')) {return 'unknown';}
|
||||
if (isIn($currCond,'Mostly Cloudy','Mostly Cloudy with Haze','Mostly Cloudy and Breezy')) {return 'bkn';}
|
||||
if (isIn($currCond,'Fair','Clear','Fair with Haze','Clear with Haze','Fair and Breezy','Clear and Breezy')) {return 'skc';}
|
||||
if (isIn($currCond,'A Few Clouds','A Few Clouds with Haze','A Few Clouds and Breezy')) {return 'few';}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue